[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH v2 17/17] cr-daily-branch: Heuristics for when to do immediate retest flight



Do not do a retest if it would involve retesting more than 10% of the
original flight, or if it wouldn't get a push even if the retests
pass.

Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>
---
 cr-daily-branch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/cr-daily-branch b/cr-daily-branch
index 9b1961bd..e54ca227 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -497,11 +497,26 @@ while true; do
        OSSTEST_IMMEDIATE_RETRY=false
        retry_jobs=$(
                perl <$mrof -wne '
+                       $n_blockers = $1 if m/^nblockers (\d+)\s*$/;
+                       $n_jobs     = $1 if m/^njobs (\d+)\s*$/;
                        next unless m/^regression (\S+) /;
                        my $j = $1;
                        next if $j =~ m/^build/;
                        $r{$j}++;
+                       sub nope {
+                               print STDERR "no retry: @_\n";
+                               exit 0;
+                       }
                        END {
+                               my $n_retry_jobs = scalar(keys %r);
+                               print STDERR <<"END";
+n_retry_jobs=$n_retry_jobs n_blockers=$n_blockers n_jobs=$n_jobs
+END
+                               nope("other blockers") if 
+                                        $n_retry_jobs < $n_blockers;
+                               nope("too many regressions") if
+                                       $n_retry_jobs > 1 &&
+                                       $n_retry_jobs > $n_jobs/10;
                                print "copy-jobs '$flight' $_ "
                                        foreach sort keys %r;
                        }'
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.