Skip to contentSkip to conversation

mg-all-branch-statuses: Show how up to date each branch is

PATCH Superseded Ian Campbell 2 participants 5 messages Jun 29, 2015

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mg-all-branch-statuses: Show how up to date each branch is

The osstest branch doesn't expose pretest (at least not to the machine I tested this on), so it ends up ignored here.

Some branches (e.g. linux-next) do not record a baseline, so the script allows for that.

Since everything serialises on the repo lock I didn't bother trying to parallelise anything.

---
I did wonder about adding this to some cronjob or something.

Example output:

libvirt                          d10a5f58c75e7eb5943b44cc36a1e768adb2cdb0 => f7d8aa44b06e5cfa06abea4a72ee26b13754667d
linux-3.0                        e1c63f9f42393f7c1dc072db7e0d54e599e96b46 => 5dba9ddd98cbc7ad319d687887981a0ea0062c75
linux-3.10                       28114597f84ea08d0f61f0a60aa23176ec36004a => OK
linux-3.14                       165797d05c15ab87ef7421c63a076ffa8477cbe4 => OK
linux-3.16                       162d64326176ee1916fb98323d810c78a7e3d042 => OK
linux-3.18                       d048c068d00da7d4cfa5ea7651933b99026958cf => OK
linux-3.4                        bb4a05a0400ed6d2f1e13d1f82f289ff74300a70 => cf1b3dad6c5699b977273276bada8597636ef3e2
linux-arm-xen                    64972ceb0b0cafc91a09764bc731e1b7f0503b5c => OK
linux-linus                      aefbef10e3ae6e2c6e3c54f906f10b34c73a2c66 => 4a10a91756ef381bced7b88cfb9232f660b92d93
linux-mingo-tip-master           d935d0f77650fea53986811ca8a2f8c726fd9857 => b830b87013d814c38a61adcf7bcfd6d4000ba5b3
linux-next                       No baseline version                      => 043831b4a4e9a981c4ec6331b6d64b9f62285d5d
ovmf                             495ee9b85141dd9b65434d677b3a685fe166128d => 79d274b8b6b113248661c18f31c4be03c7da32de
qemu-mainline                    dc1e1350f8061021df765b396295329797d66933 => OK
qemu-upstream-4.2-testing        d2382550f9d563da371b79e1b97b2453c77b3c8e => OK
qemu-upstream-4.3-testing        efae5e0f79f77c77720185a0d8a49f3ba49071e7 => OK
qemu-upstream-4.4-testing        32226f429cca6c79826364d8d18acb2226f2f102 => OK
qemu-upstream-4.5-testing        d9552b0af21c27535cd3c8549bb31d26bbecd506 => OK
qemu-upstream-unstable           c4a962ec0c61aa9b860a3635c8424472e6c2cc2c => OK
rumpuserxen                      30d72f3fc5e35cd53afd82c8179cc0e0b11146ad => 3b91e44996ea6ae1276bce1cc44f38701c53ee6f
seabios                          f24eb2f853d4aa28814761e0bbc7df78149f8029 => OK
xen-4.0-testing                  2692df2a2c6ca3c09ef6c3d064f36e3630ff9bdc => OK
xen-4.1-testing                  40feff8733e2ac27561a27e7c009a61ba3b320fe => OK
xen-4.2-testing                  38fcda225d6613ecc4bf44769806887252d7b2b1 => OK
xen-4.3-testing                  e7c022977eb83822edb52919a3748ebfa5705b5d => OK
xen-4.4-testing                  05ab7714ff84003b9b4542d7816b4651efb67679 => 6c1cb3dba4ff97dd40909670755f24fcdf903012
xen-4.5-testing                  e3bd3cefba5f11062523701bd07051c92a47ef34 => OK
xen-unstable                     bdf741bf4d014eec18f251576c1182ae264397bb => c40317f11b3f05e7c06a2213560c8471081f2662
---
 mg-all-branch-statuses | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100755 mg-all-branch-statuses
mg-all-branch-statuses new file +51 -0
new file mode 100755
index 0000000..75f4c72
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# Prints the status of each branch
+#
+# Usage:
+#    ./mg-all-branch-statuses [BRANCH....]
+#
+# If no BRANCHes specified, does all that are normally run by
+# cr-daily-branch or out of crontab.
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2014 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+set -o pipefail
+
+mkdir -p tmp
+
+if [ $# = 0 ]; then
+   set `./mg-list-all-branches`
+fi
+
+for branch in $@; do
+    old=`./ap-fetch-version-old $branch 2>/dev/null || true`
+    new=`./ap-fetch-version $branch 2>/dev/null || true`
+    if [ x$new = x ] ; then
+        # ??? osstest?
+        continue
+    elif [ x$old = x ] ; then
+        # e.g. linux-next doesn't record, or a new branch
+        printf "%-32s %-40s => %s\n" $branch 'No baseline version' $new
+    elif [ x$old != x$new ] ; then
+        printf "%-32s %s => %s\n" $branch $old $new
+    else
+        printf "%-32s %s => OK\n" $branch $old
+    fi
+done
Signature · 1 line
2.1.4
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST v1] mg-all-branch-statuses: Show how up to date each branch is"):

Quoted 8 lines

The osstest branch doesn't expose pretest (at least not to the machine I tested this on), so it ends up ignored here.

Some branches (e.g. linux-next) do not record a baseline, so the script allows for that.

Since everything serialises on the repo lock I didn't bother trying to parallelise anything.

...

Quoted 2 lines

Example output:
libvirt d10a5f58c75e7eb5943b44cc36a1e768adb2cdb0 => f7d8aa44b06e5cfa06abea4a72ee26b13754667d

This is lacking date information which is IMO critical.

It's probably fairly straightforward to search through the database or history to find some relevant date. What do want to know ?

1. `Commit' timestamp of last pass ?
2. `Commit' timestamp of first commit after last pass ?
3. `Commit' timestamp of tip ?

4. Start date of last flight for current baseline ?
5. Start date of first flight after last flight for current baseline ?
6. Start date of first flight for current tip ?

5 ?

Ian.

#2 lore raw
Quoted 7 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST v1] mg-all-branch-statuses: Show how up to date each branch is"):

Quoted 6 lines

The osstest branch doesn't expose pretest (at least not to the machine I tested this on), so it ends up ignored here.

Some branches (e.g. linux-next) do not record a baseline, so the script allows for that.

Quoted 7 lines
Quoted 2 lines

Since everything serialises on the repo lock I didn't bother trying to parallelise anything.

...

Quoted 2 lines

Example output:
libvirt d10a5f58c75e7eb5943b44cc36a1e768adb2cdb0 => f7d8aa44b06e5cfa06abea4a72ee26b13754667d

This is lacking date information which is IMO critical.

Right. I started off simply wondering which branches were up to date or not, not wondering why that might be so...

Quoted 6 lines

It's probably fairly straightforward to search through the database or history to find some relevant date. What do want to know ?

1. `Commit' timestamp of last pass ?
2. `Commit' timestamp of first commit after last pass ?
3. `Commit' timestamp of tip ?

2 sounds tricky, especially since there could potentially be several.

In general commit timestamps can be a bit misleading, since various things preserve them even over long periods of time before they are published and they don't necessarily correspond at all with when something became visible in the tree one is looking at.

Maybe better than nothing though.

Quoted 5 lines

4. Start date of last flight for current baseline ?
5. Start date of first flight after last flight for current baseline ?
6. Start date of first flight for current tip ?

5 ?

You mean out of all 6 options you think 5 is all we need?

The date of the of the flight which established the current baseline seems like a no-brainer (I suppose that is #4).

I'm not really sure what date of a flight relating to tip would be most useful, first try of something newer (#5?) vs most recent attempt (#6). Maybe even the _number_ of bites of the cherry would be useful?

#3 lore raw

Ian Campbell writes ("Re: [PATCH OSSTEST v1] mg-all-branch-statuses: Show how up to date each branch is"):

Quoted 9 lines · Ian Jackson
Quoted 6 lines

It's probably fairly straightforward to search through the database or history to find some relevant date. What do want to know ?

1. `Commit' timestamp of last pass ?
2. `Commit' timestamp of first commit after last pass ?
3. `Commit' timestamp of tip ?

2 sounds tricky, especially since there could potentially be several.

Yes. Although `earliest-dated nontrivial descendant of the last pass commit' is unique, it ...

Quoted 4 lines

In general commit timestamps can be a bit misleading, since various things preserve them even over long periods of time before they are published and they don't necessarily correspond at all with when something became visible in the tree one is looking at.

... is likely to exacerbate this problem. (Although I did say commit timestamp', which in git is a separate timestamp updated by rebase, cherry pick, etc., as opposed to author timestamp'.)

Quoted 9 lines

Maybe better than nothing though.

Quoted 5 lines

4. Start date of last flight for current baseline ?
5. Start date of first flight after last flight for current baseline ?
6. Start date of first flight for current tip ?

5 ?

You mean out of all 6 options you think 5 is all we need?

Yes.

Quoted 2 lines

The date of the of the flight which established the current baseline seems like a no-brainer (I suppose that is #4).

That doesn't tell us how out of date it is. If the tree is updated rarely but the tip was updated yesterday it might look like the test has been failing for months.

Quoted 2 lines

I'm not really sure what date of a flight relating to tip would be most useful, first try of something newer (#5?) vs most recent attempt (#6).

The former tells you how long it has been failing.

Quoted 1 line

Maybe even the _number_ of bites of the cherry would be useful?

Yes. You'd want both number of times _this version_ has been tried' and total number of flights since last pass'.

Perhaps I should make a library function in Osstest::Executive which provides this date and count. After all they would be useful in the email reports.

Ian.

#4 lore raw
Quoted 14 lines · Ian Jackson

Ian Campbell writes ("Re: [PATCH OSSTEST v1] mg-all-branch-statuses: Show how up to date each branch is"):

Quoted 9 lines · Ian Jackson
Quoted 6 lines

It's probably fairly straightforward to search through the database or history to find some relevant date. What do want to know ?

1. `Commit' timestamp of last pass ?
2. `Commit' timestamp of first commit after last pass ?
3. `Commit' timestamp of tip ?

2 sounds tricky, especially since there could potentially be several.

Yes. Although `earliest-dated nontrivial descendant of the last pass commit' is unique, it ...

Quoted 8 lines
Quoted 4 lines

In general commit timestamps can be a bit misleading, since various things preserve them even over long periods of time before they are published and they don't necessarily correspond at all with when something became visible in the tree one is looking at.

... is likely to exacerbate this problem. (Although I did say commit timestamp', which in git is a separate timestamp updated by rebase, cherry pick, etc., as opposed to author timestamp'.)

I knew there was two timestamps but not that they differed in this way, so good.

Quoted 10 lines
Quoted 9 lines

Maybe better than nothing though.

Quoted 5 lines

4. Start date of last flight for current baseline ?
5. Start date of first flight after last flight for current baseline ?
6. Start date of first flight for current tip ?

5 ?

You mean out of all 6 options you think 5 is all we need?

Quoted 8 lines

Yes.

Quoted 2 lines

The date of the of the flight which established the current baseline seems like a no-brainer (I suppose that is #4).

That doesn't tell us how out of date it is. If the tree is updated rarely but the tip was updated yesterday it might look like the test has been failing for months.

Ah yes, that's a useful way of thinking about things which I wasn't doing...

Quoted 4 lines
Quoted 2 lines

I'm not really sure what date of a flight relating to tip would be most useful, first try of something newer (#5?) vs most recent attempt (#6).

The former tells you how long it has been failing.

Right and is therefore much more interesting.

Quoted 4 lines
Quoted 1 line

Maybe even the _number_ of bites of the cherry would be useful?

Yes. You'd want both number of times _this version_ has been tried' and total number of flights since last pass'.

True.

Quoted 3 lines

Perhaps I should make a library function in Osstest::Executive which provides this date and count. After all they would be useful in the email reports.

That would be good, thanks.

Ian.