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

[OSSTEST PATCH 81/82] 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 <iwj@xxxxxxxxxxxxxx>
---
 sg-report-flight | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index 8f99bb69..33f953ca 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
 <th>role(s)<br>(there)</td>
 <th>install / prep.<br>started</td>
 <th>use</br>started</td>
-<th>last step<br>ended</td>
+<th>last relevant step<br>ended</td>
 <th>job<br>status</td>
 </tr>
 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 <<END, 
 <td $info->{ColourAttr}>$info->{Content}</td>
-- 
2.20.1




 


Rackspace

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