Try harder to find build logs

[?]
Aug 30, 2013, 1:53 PM
ZH6B56XRZON7AGKUPGKABU2SWOIQSYBTXVOMR66X6P6MG25Y4WZAC

Dependencies

  • [2] PEU6WJ4I Dependency tree: Revert to "repeated" links
  • [3] LZVO64YG Merge in the first bits of the API work
  • [4] HN3V252L On the build page, show how many aggregate constituents failed
  • [5] U6UJRDG2 * Oops.
  • [6] HB3OHPJL hydra: in case of cached build, add link to build that built the storepath
  • [7] 2GUAKGTB Fix indentation of build.tt
  • [8] PPJN6SDP * paging for releases page
  • [9] 7IJXKGHD Turn repeated dependencies into hyperlinks
  • [10] OZDDUMVP Automatically chomp all [%...%] directives
  • [11] J5UVLXOK * Start of a basic Catalyst web interface.
  • [12] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [13] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [14] BIVZGPUT Optimise clickable rows
  • [15] VG4QG336 Remove tablesorter
  • [16] 5EIPRLDD export logContents
  • [17] LBNVQXUB * Build the /build stuff in a separate controller.
  • [18] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.
  • [19] M6WGSGNM Don't show duration of unfinished builds
  • [20] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [21] 36M6DGIT Show the runtime/build dependencies in the build page
  • [22] YLLP6LP7 Remove the related builds tab
  • [23] QE253KG4 * Option to show the tail of a log.
  • [24] PMNWRTGJ Add multiple output support
  • [25] CAFO4ATE Always show the build duration (using the cached build if necessary)
  • [26] XKXMU5PV Ellipsize long jobset/job names to prevent bootstrap navbar breakage
  • [27] UWVMQIAC * Refactoring.
  • [28] MMDLWWZ2 automatic reload of tail log when build is running
  • [29] 3PNG7NIB Remove trailing whitespace
  • [30] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [31] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [32] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [33] MMJYE535 Also show number of evaluations of which a build is a part
  • [34] 6M4KNDXX * Catalyst::View::Download::Plain doesn't like empty files.
  • [35] SBMOICGV Evil CSS hackery to prevent link targets from being under the navbar
  • [36] SAIUFDP3 hydra: make sure viewing logs works when logs are bz2'd
  • [37] YPDYBK5G Show dependencies as a tree rather than a list
  • [38] RBHHV7P7 * Read logs using logContents function in stead of handling it everywhere separately.
  • [39] H47WLVAT * Handle the case where there is no cached build step that produced
  • [40] FU4GO5VN On build pages, provide a link to the build's first eval
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] IN272KZW * Automatically keep all builds in the latest successful release in

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 38
    [5.1641][5.1641:1682]()
    my ($self, $c, $path, $status) = @_;
    [5.1641]
    [5.1682]
    my ($self, $c, $path) = @_;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 40
    [5.1730][5.1730:1876]()
    { path => $path, busy => 0, status => $status },
    { join => ["buildstepoutputs"], order_by => ["stopTime"], limit => 1 })->single;
    [5.1730]
    [5.682]
    { path => $path, busy => 0 },
    { join => ["buildstepoutputs"], order_by => ["status", "stopTime"], rows => 1 })->single;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 46
    [5.1906][5.1906:1950]()
    my ($self, $c, $drvPath, $status) = @_;
    [5.1906]
    [5.1950]
    my ($self, $c, $drvPath) = @_;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 48
    [5.1998][5.1998:2120]()
    { drvpath => $drvPath, busy => 0, status => $status },
    { order_by => ["stopTime"], limit => 1 })->single;
    [5.1998]
    [5.2120]
    { drvpath => $drvPath, busy => 0 },
    { order_by => ["status", "stopTime"], rows => 1 })->single;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 71
    [5.2271][5.2271:2417]()
    my $cachedBuildStep = findBuildStepByOutPath($self, $c, $path,
    $build->buildstatus == 0 || $build->buildstatus == 6 ? 0 : 1);
    [5.2271]
    [5.0]
    my $cachedBuildStep = findBuildStepByOutPath($self, $c, $path);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 97
    [5.100][5.57:124](),[5.57][5.57:124]()
    ($c->stash->{eval}) = $c->stash->{build}->jobsetevals->search(
    [5.100]
    [5.124]
    $c->stash->{eval} = $c->stash->{build}->jobsetevals->search(
  • replacement in src/lib/Hydra/Controller/Build.pm at line 99
    [5.154][5.154:199]()
    { limit => 1, order_by => ["id"] });
    [5.154]
    [3.4281]
    { rows => 1, order_by => ["id"] })->single;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 134
    [5.1443][5.211:251]()
    showLog($c, $step->drvpath, $mode);
    [5.1443]
    [5.1554]
    showLog($c, $mode, $step->drvpath, map { $_->path } $step->buildstepoutputs->all);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 140
    [5.221][5.252:305]()
    showLog($c, $c->stash->{build}->drvpath, $mode);
    [5.221]
    [5.1923]
    showLog($c, $mode, $c->stash->{build}->drvpath, map { $_->path } $c->stash->{build}->buildoutputs->all);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 145
    [5.302][5.306:341]()
    my ($c, $drvPath, $mode) = @_;
    [5.302]
    [5.0]
    my ($c, $mode, $drvPath, @outPaths) = @_;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 147
    [5.1][5.342:385]()
    my $logPath = getDrvLogPath($drvPath);
    [5.1]
    [5.1997]
    my $logPath = findLog($c, $drvPath, @outPaths);
    print STDERR "log = $logPath\n";
  • replacement in src/lib/Hydra/Controller/Build.pm at line 154
    [5.384][5.493:540]()
    my $pipeline = "nix-store -l $drvPath"
    [5.384]
    [5.465]
    my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath")
  • replacement in src/lib/Hydra/Controller/Build.pm at line 162
    [5.759][5.541:623]()
    $c->stash->{'plain'} = { data => (scalar logContents($drvPath)) || " " };
    [5.759]
    [5.353]
    $c->stash->{'plain'} = { data => (scalar logContents($logPath)) || " " };
  • replacement in src/lib/Hydra/Controller/Build.pm at line 172
    [5.307][5.624:699]()
    $c->stash->{contents} = (scalar logContents($drvPath, 50)) || " ";
    [5.307]
    [5.382]
    $c->stash->{contents} = (scalar logContents($logPath, 50)) || " ";
  • replacement in src/lib/Hydra/Controller/Build.pm at line 177
    [5.49][5.700:786]()
    $c->stash->{'plain'} = { data => (scalar logContents($drvPath, 50)) || " " };
    [5.49]
    [5.119]
    $c->stash->{'plain'} = { data => (scalar logContents($logPath, 50)) || " " };
  • replacement in src/lib/Hydra/Controller/Build.pm at line 364
    [5.340][5.340:464]()
    ? findBuildStepByOutPath($self, $c, $path, 0)
    : findBuildStepByDrvPath($self, $c, $path, 0)
    [5.340]
    [5.464]
    ? findBuildStepByOutPath($self, $c, $path)
    : findBuildStepByDrvPath($self, $c, $path)
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 19
    [5.48][5.9433:9497]()
    jobsetOverview removeAsciiEscapes getDrvLogPath logContents
    [5.48]
    [5.844]
    jobsetOverview removeAsciiEscapes getDrvLogPath findLog logContents
  • edit in src/lib/Hydra/Helper/Nix.pm at line 263
    [5.1312]
    [43.3643]
    return undef;
    }
    # Find the log of the derivation denoted by $drvPath. It it doesn't
    # exist, try other derivations that produced its outputs (@outPaths).
    sub findLog {
    my ($c, $drvPath, @outPaths) = @_;
    if (defined $drvPath) {
    my $logPath = getDrvLogPath($drvPath);
    return $logPath if defined $logPath;
    }
    return undef if scalar @outPaths == 0;
    my @steps = $c->model('DB::BuildSteps')->search(
    { path => { -in => [@outPaths] } },
    { select => ["drvpath"]
    , distinct => 1
    , join => "buildstepoutputs"
    });
    foreach my $step (@steps) {
    my $logPath = getDrvLogPath($step->drvpath);
    return $logPath if defined $logPath;
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 296
    [5.459][5.1315:1422]()
    my ($drvPath, $tail) = @_;
    my $logPath = getDrvLogPath($drvPath);
    die unless defined $logPath;
    [5.459]
    [5.487]
    my ($logPath, $tail) = @_;
  • replacement in src/lib/Hydra/View/TT.pm at line 11
    [5.41][5.0:51]()
    expose_methods => [qw/log_exists ellipsize/]);
    [5.41]
    [5.6867]
    expose_methods => [qw/log_exists buildLogExists buildStepLogExists/]);
  • edit in src/lib/Hydra/View/TT.pm at line 17
    [5.9874]
    [5.9874]
    }
    sub buildLogExists {
    my ($self, $c, $build) = @_;
    my @outPaths = map { $_->path } $build->buildoutputs->all;
    return defined findLog($c, $build->drvpath, @outPaths);
  • replacement in src/lib/Hydra/View/TT.pm at line 25
    [5.6919][5.52:166]()
    sub ellipsize {
    my ($self, $c, $s, $n) = @_;
    return length $s <= $n ? $s : substr($s, 0, $n - 3) . "...";
    [5.6919]
    [5.166]
    sub buildStepLogExists {
    my ($self, $c, $step) = @_;
    my @outPaths = map { $_->path } $step->buildstepoutputs->all;
    return defined findLog($c, $step->drvpath, @outPaths);
  • replacement in src/root/build.tt at line 26
    [5.11941][5.11941:11990]()
    [% has_log = log_exists(step.drvpath);
    [5.11941]
    [5.0]
    [% has_log = buildStepLogExists(step);
  • replacement in src/root/build.tt at line 180
    [5.59][4.1236:1299]()
    [% IF !isAggregate && log_exists(build.drvpath) %]
    [5.59]
    [5.6492]
    [% IF !isAggregate && buildLogExists(build) %]
  • replacement in src/root/deps.tt at line 15
    [5.462][5.462:513]()
    IF log_exists(node.buildStep.drvpath);
    [5.462]
    [2.91]
    IF buildStepLogExists(node.buildStep);