Re-implement log size limits

[?]
Oct 6, 2015, 3:35 PM
HH3LID6L4WJZV6NEDVCLPCO6KF2NLUUV3VJPFNJUQZCIESK3JYSQC

Dependencies

  • [2] MHVIT4JY Split hydra-queue-runner.cc more
  • [3] AUMIJSEO Fix remote building on Nix 1.10
  • [4] AF74AH2S Remove localhost hack
  • [5] 5AIYUMTB Basic remote building
  • [6] IK2UBDAU Revive jobset scheduling
  • [7] VZKB5CIE Workaround for RemoteStore not supporting cmdBuildDerivation yet
  • [8] OCZ4LSGG Automatically retry aborted builds
  • [9] NAYQT2GT hydra-queue-runner: Use cmdBuildDerivation
  • [10] N4IROACV Move buildRemote() into State
  • [*] HJOEIMLR Refactor
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] UQQ4IL55 Add a error type for "unsupported system type"
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] IK53RV4V
  • [*] HHOMBU7G hydra-queue-runner: Implement timeouts
  • [*] 6KIJX24R Get rid of unnecessary [%- and -%] tags
  • [*] T6KISLR6 Fix indentation
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [*] JGLE5BRN Add separate build step status codes for cached failures and timeouts

Change contents

  • edit in src/hydra-queue-runner/build-remote.cc at line 158
    [5.165]
    [5.79]
    unsigned int remoteVersion;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 161
    [5.89][5.166:221]()
    to << SERVE_MAGIC_1 << SERVE_PROTOCOL_VERSION;
    [5.89]
    [5.172]
    to << SERVE_MAGIC_1 << 0x202;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 167
    [5.533][5.379:475](),[5.379][5.379:475]()
    unsigned int version = readInt(from);
    if (GET_PROTOCOL_MAJOR(version) != 0x200)
    [5.533]
    [5.534]
    remoteVersion = readInt(from);
    if (GET_PROTOCOL_MAJOR(remoteVersion) != 0x200)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 170
    [5.655][4.0:46]()
    if (GET_PROTOCOL_MINOR(version) >= 1)
    [5.655]
    [5.268]
    if (GET_PROTOCOL_MINOR(remoteVersion) >= 1)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 242
    [5.919][5.919:1009]()
    to << cmdBuildPaths << PathSet({step->drvPath}) << maxSilentTime << buildTimeout;
    [5.919]
    [5.1009]
    to << cmdBuildPaths << PathSet({step->drvPath});
  • replacement in src/hydra-queue-runner/build-remote.cc at line 244
    [5.1018][3.172:268](),[3.268][5.1115:1150](),[5.1115][5.1115:1150]()
    to << cmdBuildDerivation << step->drvPath << basicDrv << maxSilentTime << buildTimeout;
    // FIXME: send maxLogSize.
    [5.1018]
    [5.4352]
    to << cmdBuildDerivation << step->drvPath << basicDrv;
    to << maxSilentTime << buildTimeout;
    if (GET_PROTOCOL_MINOR(remoteVersion) >= 2)
    to << 64 * 1024 * 1024; // == maxLogSize
  • edit in src/hydra-queue-runner/builder.cc at line 303
    [2.10515]
    [2.10515]
    result.status == BuildResult::LogLimitExceeded ? bsLogLimitExceeded :
  • edit in src/hydra-queue-runner/builder.cc at line 308
    [2.10722]
    [2.10722]
    result.status == BuildResult::LogLimitExceeded ? bssLogLimitExceeded :
  • replacement in src/hydra-queue-runner/builder.cc at line 317
    [2.11117][2.11117:11177]()
    result.status == BuildResult::TimedOut)
    [2.11117]
    [2.11177]
    result.status == BuildResult::TimedOut ||
    result.status == BuildResult::LogLimitExceeded)
  • edit in src/hydra-queue-runner/state.hh at line 33
    [12.1731]
    [12.1731]
    bsLogLimitExceeded = 10,
  • edit in src/hydra-queue-runner/state.hh at line 44
    [12.1867]
    [12.1867]
    bssLogLimitExceeded = 10,
  • edit in src/root/build.tt at line 62
    [14.869]
    [15.20001]
    [% ELSIF step.status == 10 %]
    <span class="error">Log limit exceeded</span>
  • edit in src/root/common.tt at line 209
    [17.1761]
    [18.4181]
    [% ELSIF buildstatus == 10 %]
    <img src="[% c.uri_for("/static/images/warning_${size}.png") %]" alt="Log limit exceeded" class="build-status" />
  • edit in src/root/common.tt at line 240
    [14.1014]
    [19.2353]
    [% ELSIF buildstatus == 10 %]
    <span class="error">Log limit exceeded</span>
  • edit in src/sql/hydra.sql at line 198
    [14.1052]
    [21.4847]
    -- 10 = log limit exceeded
  • edit in src/sql/hydra.sql at line 270
    [14.1090]
    [22.1051]
    -- 10 = log limit exceeded