* Provide access to the raw, non-pretty-printed logfiles.

[?]
Mar 14, 2009, 11:27 PM
6F4UNDTCAW7LYSKTUUUCX32BLAAGYPUPK2LXMMZ32Y6H3CBWP6TQC

Dependencies

  • [2] 7Z3YOKCV * PROCESS -> INCLUDE in most cases. INCLUDE does proper scoping of
  • [3] AS5PAYLI
  • [4] MRVTLC76
  • [5] J5UVLXOK * Start of a basic Catalyst web interface.
  • [6] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [7] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [8] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [9] 6JGCGK5X
  • [10] YTSIRIMK * Separate job status and all builds pages.
  • [11] CLJQCY2X * Store info about all the build actions and allow them to be
  • [12] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [13] 5NO7NCKT * Refactoring.
  • [14] S5PV6IIM * Represent jobs explicitly in the DB.
  • [15] LBNVQXUB * Build the /build stuff in a separate controller.
  • [16] C2DCO6AS
  • [17] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [18] 6FXGLP7T * Render durations nicely.
  • [19] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [*] ZILILXXK * Allow scheduled builds to be cancelled. They're not removed from
  • [*] IK53RV4V

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 42
    [3.1115][3.1115:1213]()
    sub view_nixlog : Chained('build') PathPart('nixlog') Args(1) {
    my ($self, $c, $stepnr) = @_;
    [3.1115]
    [3.1213]
    sub view_nixlog : Chained('build') PathPart('nixlog') {
    my ($self, $c, $stepnr, $mode) = @_;
  • edit in src/lib/Hydra/Controller/Build.pm at line 48
    [3.1373][3.1373:1411]()
    $c->stash->{template} = 'log.tt';
  • replacement in src/lib/Hydra/Controller/Build.pm at line 50
    [3.1443][3.1443:1554]()
    # !!! should be done in the view (as a TT plugin).
    $c->stash->{logtext} = loadLog($c, $step->logfile);
    [3.1443]
    [3.1554]
    showLog($c, $step->logfile, $mode);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 54
    [3.1558][3.1558:1641]()
    sub view_log : Chained('build') PathPart('log') Args(0) {
    my ($self, $c) = @_;
    [3.1558]
    [3.1641]
    sub view_log : Chained('build') PathPart('log') {
    my ($self, $c, $mode) = @_;
  • edit in src/lib/Hydra/Controller/Build.pm at line 58
    [3.1092][3.1747:1786](),[3.1747][3.1747:1786]()
    $c->stash->{template} = 'log.tt';
  • replacement in src/lib/Hydra/Controller/Build.pm at line 59
    [3.1787][3.1787:1923]()
    # !!! should be done in the view (as a TT plugin).
    $c->stash->{logtext} = loadLog($c, $c->stash->{build}->resultInfo->logfile);
    [3.1787]
    [3.1923]
    showLog($c, $c->stash->{build}->resultInfo->logfile, $mode);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 63
    [3.1927][3.1927:1966]()
    sub loadLog {
    my ($c, $path) = @_;
    [3.1927]
    [3.1997]
    sub showLog {
    my ($c, $path, $mode) = @_;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 67
    [3.70][3.70:75](),[3.75][3.1998:2259](),[3.1998][3.1998:2259]()
    # !!! quick hack
    my $pipeline = ($path =~ /.bz2$/ ? "cat $path | bzip2 -d" : "cat $path")
    . " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -"
    . " | xsltproc " . $c->path_to("xsl/log2html.xsl") . " - | tail -n +2";
    [3.70]
    [3.2259]
    if ($mode eq "") {
    # !!! quick hack
    my $pipeline = ($path =~ /.bz2$/ ? "cat $path | bzip2 -d" : "cat $path")
    . " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -"
    . " | xsltproc " . $c->path_to("xsl/log2html.xsl") . " - | tail -n +2";
  • replacement in src/lib/Hydra/Controller/Build.pm at line 74
    [3.2260][3.2260:2284]()
    return `$pipeline`;
    [3.2260]
    [3.2284]
    $c->stash->{template} = 'log.tt';
    $c->stash->{logtext} = `$pipeline`;
    }
    elsif ($mode eq "raw") {
    $c->serve_static_file($path);
    }
    else {
    error($c, "Unknown log display mode `$mode'.");
    }
  • edit in src/root/build.tt at line 166
    [21.2789]
    [21.2789]
    (<a href="[% c.uri_for('/build' build.id 'log' 'raw') %]">raw</a>)
  • replacement in src/root/build.tt at line 253
    [3.322][3.1987:2029]()
    (<a href="[% log %]">log</a>)
    [3.322]
    [3.402]
    (<a href="[% log %]">log</a>, <a href="[% "$log/raw" %]">raw</a>)
  • replacement in src/root/common.tt at line 36
    [2.1181][3.4474:4481](),[3.4474][3.4474:4481]()
    </a>
    [2.1181]
    [3.4481]
    </tt>
  • edit in src/root/common.tt at line 41
    [3.4934][3.4934:4941]()
    <tt>
  • edit in src/root/common.tt at line 42
    [2.1318][3.5077:5084](),[3.5077][3.5077:5084]()
    </a>
  • edit in src/root/log.tt at line 2
    [3.2315]
    [3.11831]
    [% PROCESS common.tt %]
  • replacement in src/root/log.tt at line 4
    [3.11832][3.4115:4282]()
    <h1>Logfile for <tt>[% build.project.name %]:[% build.job %]</tt> build [% build.id %][%IF step %], step [% step.stepnr %] (<tt>[% step.outpath %]</tt>)[% END %]</h1>
    [3.11832]
    [3.11895]
    <h1>Logfile for [% INCLUDE renderFullJobNameOfBuild %] build [% build.id %][%IF step %] step [% step.stepnr %][% END %]</h1>
    <p>Below is the logfile of the <a href="[% c.uri_for('/build' build.id) %]">build</a> producing Nix store path <tt>[% step.outpath %]</tt>.</p>