Add separate build step status codes for cached failures and timeouts

[?]
May 9, 2013, 10:13 PM
JGLE5BRNJTMCZFZ33G2SGOQ4F3CIZAPMU3IXCNMR5NNSG5EJLX6QC

Dependencies

  • [2] 4SJPAAJX Pass failing dependent builds to buildFinished
  • [3] 3BKF6P72 * Use Nix's negative caching.
  • [4] CLJQCY2X * Store info about all the build actions and allow them to be
  • [5] SIZ6KXPW Set the build status properly for failing local builds
  • [6] MNZ67UXO If a build step fail, immediately fail all queued builds that depend on it
  • [7] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [8] 3ZCEPLNO
  • [9] G3IUM7VL hydra: add support for succeedOnFailure feature in stdenv
  • [10] NLJJZVHO * Use ->update({...}) properly.
  • [11] LQNBKF3D
  • [12] PMNWRTGJ Add multiple output support
  • [13] UVNQPK3T Hydra/56: handle failed builds with result only at build level, not buildsteps
  • [14] AS5PAYLI
  • [15] DGZE7ZRA * Don't log redundant build steps in case of cached failures.
  • [16] HE3GX5IP Optimize fetch-git.
  • [17] VI32YSGA I should test first
  • [18] G5A7TZVI * Don't discard old build steps when restarting a build.
  • [19] LZO3C2KI * Hack around those SQLite timeouts: just retry the transaction.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] 2GUAKGTB Fix indentation of build.tt
  • [*] 7YBYT2LQ
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in src/root/build.tt at line 53
    [22.1245]
    [22.1245]
    [% ELSIF step.status == 7 %]
    <span class="error">Timed out</span>
    [% ELSIF step.status == 8 %]
    <span class="error">Cached failure</span>
  • replacement in src/script/hydra-build at line 40
    [3.266][2.0:48]()
    my ($drvPath, $errorMsg, $dependents) = @_;
    [3.266]
    [3.301]
    my ($drvPath, $status, $errorMsg, $dependents) = @_;
  • replacement in src/script/hydra-build at line 70
    [3.1353][3.1353:1383]()
    , status => 1
    [3.1353]
    [3.1383]
    , status => $status
  • replacement in src/script/hydra-build at line 185
    [3.3884][3.154:271]()
    my $errorMsg = $4;
    $errorMsg = "build failed previously (cached)" if $3 eq "cached";
    [3.3884]
    [3.1010]
    my $errorMsg;
    my $status = 1;
    if ($3 eq "cached") {
    $status = 8;
    } elsif ($3 eq "timeout") {
    $status = 7;
    } else {
    $errorMsg = $4;
    }
  • replacement in src/script/hydra-build at line 197
    [3.507][3.272:378]()
    $step->update({busy => 0, status => 1, errormsg => $errorMsg, stoptime => time});
    [3.507]
    [3.0]
    $step->update({busy => 0, status => $status, errormsg => $errorMsg, stoptime => time});
  • replacement in src/script/hydra-build at line 208
    [3.3319][3.3319:3361]()
    , status => 1
    [3.3319]
    [3.3361]
    , status => $status
  • replacement in src/script/hydra-build at line 218
    [3.1708][2.171:241]()
    failDependents($drvPathStep, $errorMsg, $dependents);
    [3.1708]
    [3.649]
    failDependents($drvPathStep, $status, $errorMsg, $dependents);
  • replacement in src/script/hydra-build at line 264
    [3.71][3.4107:4166](),[3.100][3.4107:4166](),[3.4107][3.4107:4166]()
    elsif ($someBuildFailed) { $buildStatus = 2; }
    [3.100]
    [3.4166]
    elsif (!$thisBuildFailed && $someBuildFailed) { $buildStatus = 2; }
  • replacement in src/sql/hydra.sql at line 211
    [3.7403][3.2509:2563]()
    status integer, -- 0 = success, 1 = failed
    [3.7403]
    [3.7430]
    -- Status codes:
    -- 0 = succeeded
    -- 1 = failed normally
    -- 4 = aborted
    -- 7 = timed out
    -- 8 = cached failure
    status integer,