xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 17/17] step logfiles: Rely on new logfile column
Date: Fri, 30 Jun 2017 17:25:20 +0100	[thread overview]
Message-ID: <1498839920-17025-18-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1498839920-17025-1-git-send-email-ian.jackson@eu.citrix.com>

These are the three places which read logfile from the db, but had a
fallback to a computation involving stepno and step.

But, after steps-logfile-constraint, the logfile column is NOT NULL
(and populated with computed default data if need be) so this is not
needed any more

This is part of a "Populate-then-rely" schema change, as
described in schema/README.updates.  Specifically, the step:
10. Optionally commit: code which relies on new column, and does not
   necessarily tolerate NULL/DEFAULT; changing `constraint' to Needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 determine-failure-reasons           | 2 +-
 schema/steps-logfile-constraint.sql | 2 +-
 sg-report-flight                    | 5 ++---
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/determine-failure-reasons b/determine-failure-reasons
index 89c67e6..42791c3 100755
--- a/determine-failure-reasons
+++ b/determine-failure-reasons
@@ -52,7 +52,7 @@ sub gethosts ($) {
 }
 
 while (my $step= $stepsq->fetchrow_hashref) {
-    my $logfile = $step->{logfile} // "$step->{stepno}.$step->{step}.log";
+    my $logfile = $step->{logfile};
     $step->{Log}= "$c{Logs}/$step->{flight}/$step->{job}/".$logfile;
 
     if (!stat $step->{Log}) {
diff --git a/schema/steps-logfile-constraint.sql b/schema/steps-logfile-constraint.sql
index 462941e..b261fd0 100644
--- a/schema/steps-logfile-constraint.sql
+++ b/schema/steps-logfile-constraint.sql
@@ -1,4 +1,4 @@
--- ##OSSTEST## 004 Ready
+-- ##OSSTEST## 004 Needed
 --
 -- Previously, the logfile name was inferred from "stepno" and
 -- "testid".  Newer code will need it to be set explicitly.
diff --git a/sg-report-flight b/sg-report-flight
index 4e3560e..135f0d4 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -1001,8 +1001,7 @@ END
         printf H "<td>%s</td>", show_abs_time $step->{started};
 
         my $st= $step->{status};
-        my $logfilename= $step->{logfile}
-	    // "$step->{stepno}.$step->{step}.log";
+        my $logfilename= $step->{logfile};
         printf H "<td bgcolor='%s'><a href='%s'>%s</a></td>",
 	    (html_status2_colour_priority($st))[0],
             encode_entities(uri_escape($logfilename)),
@@ -1168,7 +1167,7 @@ END
 		: ('#ffff00',250);
 	}
 	my $ch = "bgcolor=\"$bgc\"";
-	my $logfilename= $s->{logfile} // "$s->{stepno}.$s->{step}.log";
+	my $logfilename= $s->{logfile};
 	my $h = "<a href=\"".encode_entities($s->{job}).
 	    "/".encode_entities($logfilename)."\">";
 	#print H "[$s->{stepno}] ";
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      parent reply	other threads:[~2017-06-30 16:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 16:25 [OSSTEST PATCH 00/17] Fix substep (eg XTF) logfile links Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 01/17] Developer docs: A rune for flight comparision Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 02/17] schema updates: Fix typo in developer doc Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 03/17] schema updates: Document how to remove a used column Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 04/17] schema updates: mg-schema-test-database: Cope with applied updates Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 05/17] schema updates: Be willing to apply Ready changes Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 06/17] db updates: Make all INSERTs (except into steps) name columns explicitly Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 07/17] step logfiles: Break out $logfilename in two places Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 08/17] step logfiles: Standalone mode: Do not print uninformative $script value Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 09/17] substep logfiles: Move defaulting of $script into Executive Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 10/17] step logfiles: Provide new column Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 11/17] substep logfiles: Populate new logfile column, at all, for substeps Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 12/17] substep logfiles: Set logfile and step columns correctly " Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 13/17] step logfiles: Honour new logfile column Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 14/17] step logfiles: Make substep_* take $logfile, not $script Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 15/17] step logfiles: sg-run-job: Break out step-log-leafname Ian Jackson
2017-06-30 16:25 ` [OSSTEST PATCH 16/17] step logfiles: Populate logfile column with logfile name Ian Jackson
2017-06-30 16:25 ` Ian Jackson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498839920-17025-18-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).