[OSSTEST,4/4] cs-bisection-step: Do not insist on urls in main history search
diff mbox series

Message ID 20200601124430.29761-4-ian.jackson@eu.citrix.com
State New
Headers show
Series
  • [OSSTEST,1/4] cs-bisection-step: Change some url. references to job.
Related show

Commit Message

Ian Jackson June 1, 2020, 12:44 p.m. UTC
If a Xen build fails, but we are trying to bisect something involving
libvirt, the libvirt job does not really run.  It does not populate
the tree_<tree> values for its git submodules - that would involve
actually booking out a host and cloning it.

The effect is that xen build failures which occur somewhere in the
range of a libvirt bisection cause total failure (actually, looping
bisection) rather than treating the build failure as `blocked'.

Fix this by tolerating trees with missing urls - but only during the
main history search.  Most of the rest of the time we need the urls,
mainly because we are going to feed them to adhoc-revtuple-generator
and mention them in our output.

It could now happen that trees appear in the main bisection history
which weren't in our bases.  These end up being ignored by
flight_rtuple.  This is not ideal but it will do for now.  In any case
that aspect is no worse than before.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 cs-bisection-step | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/cs-bisection-step b/cs-bisection-step
index 2f75313e..478baa5b 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -179,9 +179,8 @@  sub relevant_hosts ($) {
 END
 }
 
-sub flight_rmap ($) {
-    my ($flight) = @_;
-    my $need_urls = 1;
+sub flight_rmap ($$) {
+    my ($flight, $need_urls) = @_;
 
     $dbh_tests->do(<<END, {});
           CREATE TEMP TABLE tmp_build_info (
@@ -322,7 +321,7 @@  END
 
 sub flight_rtuple ($) {
     my ($flight) = @_;
-    my $map= flight_rmap($flight);
+    my $map= flight_rmap($flight,0);
     return () if !defined $map;
     my @revisions= ();
     die unless @treeinfos;
@@ -396,12 +395,12 @@  END
 
         print STDERR " [$failhosts] ";
 
-	my $failrmap = flight_rmap($tryfail->{flight});
+	my $failrmap = flight_rmap($tryfail->{flight},1);
 	next unless $failrmap;
 
 	my $checkbasisvcs = sub {
 	    my ($trybasisflight) = @_;
-	    my $basisrmap = flight_rmap($trybasisflight);
+	    my $basisrmap = flight_rmap($trybasisflight,1);
 	    my @bad;
 #print STDERR Dumper($failrmap, $basisrmap);
 	    foreach my $tree (keys %$failrmap) {
@@ -480,8 +479,8 @@  END
 our (%nodes, @latest_rtuple, @basispass_rtuple);
 
 sub digraph_whole () {
-    my $latest_rmap= flight_rmap($latest_flight);
-    my $basispass_rmap= flight_rmap($basispass_flight);
+    my $latest_rmap= flight_rmap($latest_flight,1);
+    my $basispass_rmap= flight_rmap($basispass_flight,1);
     if (!defined $basispass_rmap) {
 	die "Basis pass $basispass_flight rmap indeterminate/wrong\n";
     }