From: Ian Jackson Date: Mon, 5 Oct 2020 17:47:12 +0000 (+0100) Subject: sg-report-flight: Sharing reports: more task finished info X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bee5e77184506e59cd3a7672d2d20c59b6e34e59;p=osstest.git sg-report-flight: Sharing reports: more task finished info Other steps from jobs affecting this host either started after we are running, and therefore didn't affect the stuff we're reporting, or already in the db. Furthermore, any such effects for steps which have finished must have completed by the max finished time But if there are unfinished steps, we don't know the finish time. Signed-off-by: Ian Jackson --- diff --git a/sg-report-flight b/sg-report-flight index 8f99bb6..33f953c 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1355,7 +1355,8 @@ END # table rows to the overall union (sum type) rows. my $nullcols_main = nullcols(qw( flight::integer job status oidents - started::integer rest_started::integer finished::integer + started::integer rest_started::integer + finished::integer all_finished::boolean )); my $nullcols_tasks = nullcols(qw( taskid::integer type refkey username comment @@ -1382,7 +1383,11 @@ END (SELECT max(finished) FROM steps s WHERE s.flight = q.flight - AND s.job = q.job) AS finished + AND s.job = q.job) AS finished, + (SELECT every(finished IS NOT NULL) + FROM steps s + WHERE s.flight = q.flight + AND s.job = q.job) AS all_finished FROM Q ORDER BY q.tident), @@ -1401,6 +1406,7 @@ END min(prep_started) AS prep_started, min(rest_started) AS rest_started, max(finished) AS finished, + every(all_finished) AS all_finished, $nullcols_tasks, $nullcols_elided, NULL::integer AS sort_index @@ -1466,7 +1472,7 @@ END role(s)
(there) install / prep.
started use
started -last step
ended +last relevant step
ended job
status END @@ -1522,7 +1528,7 @@ END map { $_ ? show_abs_time($_) : '' } $srow->{prep_started}, $srow->{rest_started}, - !$srow->{olive} && $srow->{finished}; + (!$srow->{olive} || $srow->{all_finished}) && $srow->{finished}; my $info = report_run_getinfo($srow); print H <{ColourAttr}>$info->{Content}