Unify build and step status codes

[?]
Mar 9, 2016, 2:15 PM
UNVMKJV5VX74A2MLS42AP3SY25HKQSH4S27Y44QFKRQRKPU2MV6QC

Dependencies

  • [2] BCDHO4OU Set propagatedFrom for cached failed build steps
  • [3] VQISTKOP hydra-queue-runner: Use substitutes
  • [4] HH3LID6L Re-implement log size limits
  • [5] 26PYNDXV Remove the errorMsg column from the Builds table
  • [6] FITVNQ2S Keep track of the time we spend copying to/from build machines
  • [7] XBLTCIUZ Show build status 2 and 5 in the same way
  • [8] 3ZCEPLNO
  • [9] JGLE5BRN Add separate build step status codes for cached failures and timeouts
  • [10] 5DSF5KWY * Perl sucks. "getBuildLog $drvPath" doesn't mean the same as
  • [11] 7LFMSF4K Don't show "localhost" as machine for cached failed build steps
  • [12] GS4SFHCP templates: Use uri_for to reference static paths.
  • [13] WYN733ST * Store build duration, handle cached builds.
  • [14] T6KISLR6 Fix indentation
  • [15] E5DMQRPO Remove unnecessary whitespace in the HTML output
  • [16] 3SQCOHZN * minor performance tweaks
  • [17] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [18] PMNWRTGJ Add multiple output support
  • [19] HHOMBU7G hydra-queue-runner: Implement timeouts
  • [20] BRAESISH Warn if PostgreSQL appears stalled
  • [21] GJV2J5HX Pool local store connections
  • [22] 2GUAKGTB Fix indentation of build.tt
  • [23] SL3WSRAC hydra-queue-runner: Limit memory usage
  • [24] PH3DFCNU Render machine correctly if it doesn't contain @
  • [25] KBZHIGLG Record the machine used for a build step
  • [26] CLJQCY2X * Store info about all the build actions and allow them to be
  • [27] OCZ4LSGG Automatically retry aborted builds
  • [28] TX7Q4RAS Add page showing latest build steps
  • [29] NKQOEVVP Get rid of "will retry" messages after "maybe cancelling..."
  • [30] OG3Z3QGC Namespace cleanup
  • [31] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [32] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [33] TPNHTE5V Remove obsolete Builds columns and provide accurate "Running builds"
  • [34] MHVIT4JY Split hydra-queue-runner.cc more
  • [35] HJOEIMLR Refactor
  • [36] T5BIOVJE Add support for tracking custom metrics
  • [37] FQQRJUO4 Mark builds as busy
  • [38] NAYQT2GT hydra-queue-runner: Use cmdBuildDerivation
  • [39] 24BMQDZA Start of single-process hydra-queue-runner
  • [40] ZILILXXK * Allow scheduled builds to be cancelled. They're not removed from
  • [41] UQQ4IL55 Add a error type for "unsupported system type"
  • [42] 62MQPRXC Pass null values to libpqxx properly
  • [43] MSIHMO45 Tweak build steps
  • [44] N4IROACV Move buildRemote() into State
  • [45] NQ2X3Y4K Don't render machine name if not applicable to step
  • [46] U2X3Y53G make sure status images always display for a list of builds
  • [47] 6KIJX24R Get rid of unnecessary [%- and -%] tags
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] IK53RV4V
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • replacement in src/hydra-queue-runner/builder.cc at line 119
    [7.4030][7.4030:4131]()
    stepNr = createBuildStep(txn, result.startTime, build, step, machine->sshName, bssBusy);
    [7.4030]
    [7.4224]
    stepNr = createBuildStep(txn, result.startTime, build, step, machine->sshName, bsBusy);
  • replacement in src/hydra-queue-runner/builder.cc at line 174
    [6.530][7.5615:5687](),[7.5615][7.5615:5687]()
    stepNr, machine->sshName, bssAborted, result.errorMsg);
    [6.530]
    [7.5687]
    stepNr, machine->sshName, bsAborted, result.errorMsg);
  • replacement in src/hydra-queue-runner/builder.cc at line 225
    [6.620][6.620:690]()
    build->id, stepNr, machine->sshName, bssSuccess);
    [6.620]
    [7.7478]
    build->id, stepNr, machine->sshName, bsSuccess);
  • edit in src/hydra-queue-runner/builder.cc at line 317
    [7.10597][7.10597:10722](),[7.10722][4.573:664](),[4.664][7.10722:10806](),[7.10722][7.10722:10806]()
    BuildStepStatus buildStepStatus =
    result.status == BuildResult::TimedOut ? bssTimedOut :
    result.status == BuildResult::LogLimitExceeded ? bssLogLimitExceeded :
    result.canRetry() ? bssAborted :
    bssFailed;
  • replacement in src/hydra-queue-runner/builder.cc at line 338
    [7.11892][7.11892:11984]()
    buildStepStatus, result.errorMsg, build == build2 ? 0 : build->id);
    [7.11892]
    [7.11984]
    buildStatus, result.errorMsg, build == build2 ? 0 : build->id);
  • replacement in src/hydra-queue-runner/builder.cc at line 343
    [6.784][6.784:880]()
    build->id, stepNr, machine->sshName, buildStepStatus, result.errorMsg);
    [6.784]
    [7.12211]
    build->id, stepNr, machine->sshName, buildStatus, result.errorMsg);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 205
    [7.7964][7.23:50]()
    ((int) bssAborted)
    [7.7964]
    [7.50]
    ((int) bsAborted)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 223
    [3.226][3.226:337]()
    const std::string & machine, BuildStepStatus status, const std::string & errorMsg, BuildID propagatedFrom)
    [3.226]
    [3.337]
    const std::string & machine, BuildStatus status, const std::string & errorMsg, BuildID propagatedFrom)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 233
    [3.470][3.470:506]()
    (status == bssBusy ? 1 : 0)
    [3.470]
    [7.73]
    (status == bsBusy ? 1 : 0)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 236
    [7.138][7.220:262](),[7.220][7.220:262]()
    ((int) status, status != bssBusy)
    [7.138]
    [7.262]
    ((int) status, status != bsBusy)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 239
    [7.343][7.139:196]()
    (startTime, startTime != 0 && status != bssBusy)
    [7.343]
    [7.49]
    (startTime, startTime != 0 && status != bsBusy)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 252
    [6.985][6.985:1071]()
    BuildID buildId, int stepNr, const std::string & machine, BuildStepStatus status,
    [6.985]
    [6.1071]
    BuildID buildId, int stepNr, const std::string & machine, BuildStatus status,
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 208
    [2.1158][2.1158:1255]()
    createBuildStep(txn, 0, build, r, "", bssCachedFailure, "", propagatedFrom);
    [2.1158]
    [7.26648]
    createBuildStep(txn, 0, build, r, "", bsCachedFailure, "", propagatedFrom);
  • replacement in src/hydra-queue-runner/state.hh at line 29
    [7.1620][7.1620:1641]()
    bsDepFailed = 2,
    [7.1620]
    [7.1641]
    bsDepFailed = 2, // builds only
  • replacement in src/hydra-queue-runner/state.hh at line 31
    [7.1660][7.1660:1688]()
    bsFailedWithOutput = 6,
    [7.1660]
    [7.1688]
    bsFailedWithOutput = 6, // builds only
  • edit in src/hydra-queue-runner/state.hh at line 33
    [7.1708]
    [7.1708]
    bsCachedFailure = 8, // steps only
  • edit in src/hydra-queue-runner/state.hh at line 36
    [4.825]
    [7.1731]
    bsBusy = 100, // not stored
  • edit in src/hydra-queue-runner/state.hh at line 38
    [7.1746][7.1746:1843](),[7.1843][7.2362:2388](),[7.2388][7.1843:1867](),[7.1843][7.1843:1867](),[7.1867][4.826:856](),[4.856][7.1867:1919](),[7.1867][7.1867:1919]()
    typedef enum {
    bssSuccess = 0,
    bssFailed = 1,
    bssAborted = 4,
    bssTimedOut = 7,
    bssCachedFailure = 8,
    bssUnsupported = 9,
    bssLogLimitExceeded = 10,
    bssBusy = 100, // not stored
    } BuildStepStatus;
  • replacement in src/hydra-queue-runner/state.hh at line 377
    [7.7121][7.7121:7217]()
    const std::string & machine, BuildStepStatus status, const std::string & errorMsg = "",
    [7.7121]
    [7.7217]
    const std::string & machine, BuildStatus status, const std::string & errorMsg = "",
  • replacement in src/hydra-queue-runner/state.hh at line 382
    [6.1562][7.667:763](),[7.7362][7.667:763]()
    const std::string & machine, BuildStepStatus status, const std::string & errorMsg = "",
    [6.1562]
    [7.7453]
    const std::string & machine, BuildStatus status, const std::string & errorMsg = "",
  • replacement in src/root/build.tt at line 58
    [7.1151][7.1151:1194]()
    [% ELSIF step.status == 4 %]
    [7.1151]
    [7.6782]
    [% ELSIF step.status == 3 %]
  • replacement in src/root/common.tt at line 198
    [7.220][7.0:53](),[7.518][7.0:53](),[7.454][7.0:53]()
    [% ELSIF buildstatus == 2 || buildstatus == 5 %]
    [7.220]
    [7.221]
    [% ELSIF buildstatus == 2 %]
  • replacement in src/root/common.tt at line 227
    [7.1494][7.54:107]()
    [% ELSIF buildstatus == 2 || buildstatus == 5 %]
    [7.1494]
    [7.1594]
    [% ELSIF buildstatus == 2 %]
  • replacement in src/sql/hydra.sql at line 183
    [7.4671][7.4671:4692]()
    -- Status codes:
    [7.4671]
    [7.4692]
    -- Status codes used for builds and steps:
  • replacement in src/sql/hydra.sql at line 185
    [7.4715][7.4715:4805](),[7.4805][5.143:170](),[5.170][7.3108:3171](),[7.4847][7.3108:3171](),[7.3171][7.48:126](),[7.126][7.19705:19738](),[7.19738][7.1839:1862]()
    -- 1 = build of this derivation failed
    -- 2 = build of some dependency failed
    -- 3 = other failure
    -- 4 = build cancelled (removed from queue; never built)
    -- 5 = build not done because a dependency failed previously (obsolete)
    -- 6 = failure with output
    -- 7 = timed out
    [7.4715]
    [7.1015]
    -- 1 = regular Nix failure (derivation returned non-zero exit code)
    -- 2 = build of a dependency failed [builds only]
    -- 3 = build or step aborted due to misc failure
    -- 4 = build cancelled (removed from queue; never built) [builds only]
    -- 5 = [obsolete]
    -- 6 = failure with output (i.e. $out/nix-support/failed exists) [builds only]
    -- 7 = build timed out
    -- 8 = cached failure [steps only; builds use isCachedBuild]
  • replacement in src/sql/hydra.sql at line 257
    [7.7403][7.906:1051](),[7.1051][7.1053:1090](),[7.1090][4.1239:1271](),[7.1090][7.1051:1078](),[4.1271][7.1051:1078](),[7.1051][7.1051:1078]()
    -- Status codes:
    -- 0 = succeeded
    -- 1 = failed normally
    -- 4 = aborted
    -- 7 = timed out
    -- 8 = cached failure
    -- 9 = unsupported system type
    -- 10 = log limit exceeded
    status integer,
    [7.7403]
    [7.7430]
    status integer, -- see Builds.buildStatus
  • file addition: upgrade-46.sql (----------)
    [52.3004]
    -- Unify Builds and BuildSteps status codes.
    update BuildSteps set status = 3 where status = 4;
    -- Get rid of obsolete status code 5.
    update Builds set isCachedBuild = 1, buildStatus = 2 where buildStatus = 5;