@@ -52,7 +52,7 @@ sub gethosts ($) {
}
while (my $step= $stepsq->fetchrow_hashref) {
- my $logfile = "$step->{stepno}.$step->{step}.log";
+ my $logfile = $step->{logfile} // "$step->{stepno}.$step->{step}.log";
$step->{Log}= "$c{Logs}/$step->{flight}/$step->{job}/".$logfile;
if (!stat $step->{Log}) {
@@ -1001,7 +1001,8 @@ END
printf H "<td>%s</td>", show_abs_time $step->{started};
my $st= $step->{status};
- my $logfilename= "$step->{stepno}.$step->{step}.log";
+ my $logfilename= $step->{logfile}
+ // "$step->{stepno}.$step->{step}.log";
printf H "<td bgcolor='%s'><a href='%s'>%s</a></td>",
(html_status2_colour_priority($st))[0],
encode_entities(uri_escape($logfilename)),
@@ -1167,7 +1168,7 @@ END
: ('#ffff00',250);
}
my $ch = "bgcolor=\"$bgc\"";
- my $logfilename= "$s->{stepno}.$s->{step}.log";
+ my $logfilename= $s->{logfile} // "$s->{stepno}.$s->{step}.log";
my $h = "<a href=\"".encode_entities($s->{job}).
"/".encode_entities($logfilename)."\">";
#print H "[$s->{stepno}] ";
There are the following places in the tree where we construct the logfile name from stepno and step: * tcl/JobDB-Executive main decision about logfile name } OK * JobDB::Executive final fallback for new steps } keep * steps-logfile-constraint.sql default for old data } * sg-report-flight (twice) } both read stepno and step from the db; * determine-failure-reasons } here we teach them to try logfile first Now substep logs will have correct links in the job output, as soon as the logfile column has the right data. This is part of a "Populate-then-rely" schema change, as described in schema/README.updates. Specifically, this is the step: 6. Optionally commit: code which reads new column, but which tolerates it containing NULL/DEFAULT. (`add' is already Needed.) Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> --- determine-failure-reasons | 2 +- sg-report-flight | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)