From: Ian Jackson Date: Mon, 12 Oct 2020 15:48:26 +0000 (+0100) Subject: cr-daily-branch: Heuristics for when to do immediate retest flight X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=94119b96af5603a4bb31ef473ebfcbca80abb63d;p=osstest.git 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 --- diff --git a/cr-daily-branch b/cr-daily-branch index 9b1961b..e54ca22 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; }'