diff mbox

[Xen-devel,OSSTEST,v2,14/15] distros: add branch infrastructure

Message ID 1398681696-2773-14-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell April 28, 2014, 10:41 a.m. UTC
Since the distro nightlies are not version controlled we cannot use the usual
mechanisms for detecting regressions. Instead compare each run against its
predecessor, determined using sg-check-tested.

XXX needs testing in production environment.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ap-fetch-version     |  4 ++++
 ap-fetch-version-old |  3 +++
 ap-print-url         |  3 +++
 cr-daily-branch      | 11 ++++++++++-
 cri-common           |  1 +
 5 files changed, 21 insertions(+), 1 deletion(-)

Comments

Ian Jackson May 2, 2014, 2:04 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST v2 14/15] distros: add branch infrastructure"):
> Since the distro nightlies are not version controlled we cannot use the usual
> mechanisms for detecting regressions. Instead compare each run against its
> predecessor, determined using sg-check-tested.
> 
> XXX needs testing in production environment.
...
> --- a/ap-fetch-version
> +++ b/ap-fetch-version
> @@ -77,6 +77,10 @@ gnulib-libvirt)
...	;;
> +distros)
> +	# None, this is just a regular test.
> +	echo latest
> +	;;

Is doing this really easier than doing it in cr-daily-branch ?

And I think perhaps ...

> diff --git a/cri-common b/cri-common
> index f472927..c02ad06 100644
> --- a/cri-common
> +++ b/cri-common
> @@ -43,6 +43,7 @@ select_xenbranch () {
>  	linux-*)		tree=linux;	xenbranch=xen-unstable ;;
>  	linuxfirmware)	    tree=linuxfirmware;	xenbranch=xen-unstable ;;
>  	libvirt)		tree=libvirt;	xenbranch=xen-unstable ;;
> +	distros)		tree=distros;	xenbranch=xen-unstable ;;

... this should be "tree=none".  What do you think ?

Ian.
Ian Campbell May 2, 2014, 2:09 p.m. UTC | #2
On Fri, 2014-05-02 at 15:04 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v2 14/15] distros: add branch infrastructure"):
> > Since the distro nightlies are not version controlled we cannot use the usual
> > mechanisms for detecting regressions. Instead compare each run against its
> > predecessor, determined using sg-check-tested.
> > 
> > XXX needs testing in production environment.
> ...
> > --- a/ap-fetch-version
> > +++ b/ap-fetch-version
> > @@ -77,6 +77,10 @@ gnulib-libvirt)
> ...	;;
> > +distros)
> > +	# None, this is just a regular test.
> > +	echo latest
> > +	;;
> 
> Is doing this really easier than doing it in cr-daily-branch ?

You mean avoiding calling ap-fetch-version for this branch? I didn't
try, I'd have thought it would involve a handful of special cases.
Although if you mean to handle none here (cf your second comment) then
that might work nicely.

> And I think perhaps ...
> 
> > diff --git a/cri-common b/cri-common
> > index f472927..c02ad06 100644
> > --- a/cri-common
> > +++ b/cri-common
> > @@ -43,6 +43,7 @@ select_xenbranch () {
> >  	linux-*)		tree=linux;	xenbranch=xen-unstable ;;
> >  	linuxfirmware)	    tree=linuxfirmware;	xenbranch=xen-unstable ;;
> >  	libvirt)		tree=libvirt;	xenbranch=xen-unstable ;;
> > +	distros)		tree=distros;	xenbranch=xen-unstable ;;
> 
> ... this should be "tree=none".  What do you think ?

I've no idea... The logic is that there is no pushed thing there is no
tree?

Ian.
Ian Jackson May 2, 2014, 2:30 p.m. UTC | #3
Ian Campbell writes ("Re: [PATCH OSSTEST v2 14/15] distros: add branch infrastructure"):
> On Fri, 2014-05-02 at 15:04 +0100, Ian Jackson wrote:
> > Is doing this really easier than doing it in cr-daily-branch ?
> 
> You mean avoiding calling ap-fetch-version for this branch? I didn't
> try, I'd have thought it would involve a handful of special cases.
> Although if you mean to handle none here (cf your second comment) then
> that might work nicely.

ap-print-url is used only to produce $treeurl which is only used when
calling sg-check-tested and sg-report-flight - but those calls need to
be done differently anyway and no $treeurl is applicable.

ap-fetch-version-old is meaningless on "distros" and is only called
because cr-daily-branch doesn't treat it specially.

I suppose what I mean is: is ap-* the right place to know that
"distros" isn't the same kind of thing at all ?

> > And I think perhaps ...
> > > +	distros)		tree=distros;	xenbranch=xen-unstable ;;
> > ... this should be "tree=none".  What do you think ?
> 
> I've no idea... The logic is that there is no pushed thing there is no
> tree?

Well, "tree" in cr-daily-branch is:

 - The thing whose version we treat differently, taking the "to be
   tested" rather than "baseline" version.  There is no such thing
   here - at least, nothing that has a version plumbed through to
   the runvars.

 - Something we use to search the database for previous tests, looking
   for flights with specific values of built_revision_$tree (for for
   sg-check-tested and sg-report-flight).  But we want a totally
   different approach.

Ian.
Ian Campbell May 2, 2014, 3:25 p.m. UTC | #4
On Fri, 2014-05-02 at 15:30 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v2 14/15] distros: add branch infrastructure"):
> > On Fri, 2014-05-02 at 15:04 +0100, Ian Jackson wrote:
> > > Is doing this really easier than doing it in cr-daily-branch ?
> > 
> > You mean avoiding calling ap-fetch-version for this branch? I didn't
> > try, I'd have thought it would involve a handful of special cases.
> > Although if you mean to handle none here (cf your second comment) then
> > that might work nicely.
> 
> ap-print-url is used only to produce $treeurl which is only used when
> calling sg-check-tested and sg-report-flight - but those calls need to
> be done differently anyway and no $treeurl is applicable.
> 
> ap-fetch-version-old is meaningless on "distros" and is only called
> because cr-daily-branch doesn't treat it specially.
> 
> I suppose what I mean is: is ap-* the right place to know that
> "distros" isn't the same kind of thing at all ?

I'm perfectly happy to let you decide on this. By which I mean I'll try
the "avoid ap-*" approach for next time.

> > > And I think perhaps ...
> > > > +	distros)		tree=distros;	xenbranch=xen-unstable ;;
> > > ... this should be "tree=none".  What do you think ?
> > 
> > I've no idea... The logic is that there is no pushed thing there is no
> > tree?
> 
> Well, "tree" in cr-daily-branch is:
> 
>  - The thing whose version we treat differently, taking the "to be
>    tested" rather than "baseline" version.  There is no such thing
>    here - at least, nothing that has a version plumbed through to
>    the runvars.
> 
>  - Something we use to search the database for previous tests, looking
>    for flights with specific values of built_revision_$tree (for for
>    sg-check-tested and sg-report-flight).  But we want a totally
>    different approach.

Makes sense, I think.

Ian.
diff mbox

Patch

diff --git a/ap-fetch-version b/ap-fetch-version
index 7cc2d98..17ab7c8 100755
--- a/ap-fetch-version
+++ b/ap-fetch-version
@@ -77,6 +77,10 @@  gnulib-libvirt)
 	repo_tree_rev_fetch_git gnulib-libvirt \
 		$TREE_GNULIB_LIBVIRT master $LOCALREV_GNULIB_LIBVIRT
 	;;
+distros)
+	# None, this is just a regular test.
+	echo latest
+	;;
 osstest)
 	if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
 	    git fetch $HOME/testing.git pretest:ap-fetch >&2
diff --git a/ap-fetch-version-old b/ap-fetch-version-old
index 3879e09..621641e 100755
--- a/ap-fetch-version-old
+++ b/ap-fetch-version-old
@@ -82,6 +82,9 @@  gnulib-libvirt)
 	# No push gate, same as ap-fetch-version
 	./ap-fetch-version $branch
 	;;
+distros)
+	echo "lastflight" # compare with previous flight
+	;;
 osstest)
 	if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
 	    git fetch -f $HOME/testing.git incoming:ap-fetch
diff --git a/ap-print-url b/ap-print-url
index b1af0b9..9084635 100755
--- a/ap-print-url
+++ b/ap-print-url
@@ -52,6 +52,9 @@  libvirt)
 gnulib-libvirt)
 	echo $TREE_GNULIB_LIBVIRT
 	;;
+distros)
+	echo none:;
+	;;
 osstest)
 	echo none:;
 	;;
diff --git a/cr-daily-branch b/cr-daily-branch
index 0cafe39..663870d 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -187,6 +187,11 @@  if [ "x$OLD_REVISION" = xdetermine-late ]; then
 	OLD_REVISION="`./ap-fetch-version-baseline-late $branch $NEW_REVISION`"
 fi
 
+case $branch in
+distros) makeflight=./make-distros-flight ;;
+*)       makeflight=./make-flight ;;
+esac
+
 if [ "x$NEW_REVISION" = "x$OLD_REVISION" ]; then
         wantpush=false
 	for checkbranch in x $BRANCHES_ALWAYS; do
@@ -201,7 +206,7 @@  if [ "x$NEW_REVISION" = "x$OLD_REVISION" ]; then
 fi
 
 $DAILY_BRANCH_PREMAKE_HOOK
-flight=`./make-flight $branch $xenbranch $OSSTEST_BLESSING "$@"`
+flight=`$makeflight $branch $xenbranch $OSSTEST_BLESSING "$@"`
 $DAILY_BRANCH_POSTMAKE_HOOK
 
 heading=tmp/$flight.heading-info
@@ -221,6 +226,10 @@  fi
 revlog=tmp/$flight.revision-log
 
 case "$NEW_REVISION/$OLD_REVISION" in
+/lastflight)
+        sgr_args+=" --machine-readable-output=$mrof"
+	sgr_args+=" --that-flight=`check_tested`"
+	;;
 */*[^0-9a-f]* | *[^0-9a-f]*/*)
         echo >&2 "NO SGR COMPARISON badchar $NEW_REVISION/$OLD_REVISION"
         ;;
diff --git a/cri-common b/cri-common
index f472927..c02ad06 100644
--- a/cri-common
+++ b/cri-common
@@ -43,6 +43,7 @@  select_xenbranch () {
 	linux-*)		tree=linux;	xenbranch=xen-unstable ;;
 	linuxfirmware)	    tree=linuxfirmware;	xenbranch=xen-unstable ;;
 	libvirt)		tree=libvirt;	xenbranch=xen-unstable ;;
+	distros)		tree=distros;	xenbranch=xen-unstable ;;
 	osstest)		tree=osstest;	xenbranch=xen-unstable ;;
 	esac
 	if [ "x$tree" = xlinux ]; then