hydra-queue-runner: Fix build

[?]
Oct 6, 2016, 1:24 PM
XCDTFZUYSOYEARMJCV4ORVQWG2VWZQ43HU2U63RBECP53OSCM2GQC

Dependencies

  • [2] 6IB23Y3Y Keep machine stats even when a machine is removed from the machines file
  • [3] 25MFPBZV Keep track of time required to load builds
  • [4] BYVRA54Q Temporarily disable machines on any exception, not just connection failures
  • [5] 2PQPKMG7 S3BinaryCacheStore: Use disk cache
  • [6] BRAESISH Warn if PostgreSQL appears stalled
  • [7] BAFICF73 Support hydra-build-products on binary cache stores
  • [8] SL3WSRAC hydra-queue-runner: Limit memory usage
  • [9] 7VQ4ALFY Update "make check" for the new queue runner
  • [10] 5Q7X5FPJ hydra-queue-runner: Improve SSH flags
  • [11] 4VYY2ADP Allow the machines file to specify host public keys
  • [12] 5AIYUMTB Basic remote building
  • [13] 6TY4LNHH Finish copyClosure
  • [14] FITVNQ2S Keep track of the time we spend copying to/from build machines
  • [15] SODOV2CM Automatically reload $NIX_REMOTE_SYSTEMS when it changes
  • [16] IK2UBDAU Revive jobset scheduling
  • [17] WKJFPR77 hydra-queue-runner: Maintain count of active build steps
  • [18] ENXUSMSV Make concurrency more robust
  • [19] HJOEIMLR Refactor
  • [20] DIEY5USN Keep better bytesReceived/bytesSent stats
  • [21] NTEDD7T4 Provide a plugin hook for when build steps finish
  • [22] 24BMQDZA Start of single-process hydra-queue-runner
  • [23] EYR3EW6J Keep stats for the Hydra auto scaler
  • [24] DKJFD6JN Process Nix API changes
  • [25] 73YR46NJ hydra-queue-runner: Write directly to a binary cache
  • [26] GS4BE6TB Asynchronously compress build logs
  • [27] ZSBPKI2P Pass ssh key
  • [28] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [29] NAYQT2GT hydra-queue-runner: Use cmdBuildDerivation
  • [30] K5G5GZY7 Guard against concurrent invocations of hydra-queue-runner
  • [31] TTBLPQAJ Keep track of wait time per system type
  • [32] SOB276BA Keep some statistics for the binary cache stores

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 38
    [6.584][6.584:635]()
    if (dup2(to.readSide, STDIN_FILENO) == -1)
    [6.584]
    [6.635]
    if (dup2(to.readSide.get(), STDIN_FILENO) == -1)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 41
    [6.698][6.698:753]()
    if (dup2(from.writeSide, STDOUT_FILENO) == -1)
    [6.698]
    [6.753]
    if (dup2(from.writeSide.get(), STDOUT_FILENO) == -1)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 70
    [6.1153][6.1153:1206]()
    to.readSide.close();
    from.writeSide.close();
    [6.1153]
    [6.1206]
    to.readSide = -1;
    from.writeSide = -1;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 73
    [6.1207][6.1207:1286]()
    child.to = to.writeSide.borrow();
    child.from = from.readSide.borrow();
    [6.1207]
    [6.1286]
    child.to = to.writeSide.release();
    child.from = from.readSide.release();
  • replacement in src/hydra-queue-runner/build-remote.cc at line 96
    [6.2087][6.2087:2137]()
    auto present = readStorePaths<PathSet>(from);
    [6.2087]
    [6.2137]
    auto present = readStorePaths<PathSet>(*destStore, from);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 128
    [6.3078][6.171:353]()
    AutoCloseFD logFD(open(result.logFile.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0666));
    if (logFD == -1) throw SysError(format("creating log file ‘%1%’") % result.logFile);
    [6.3078]
    [6.3246]
    AutoCloseFD logFD = open(result.logFile.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0666);
    if (!logFD) throw SysError(format("creating log file ‘%1%’") % result.logFile);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 137
    [4.32][4.32:87]()
    openConnection(machine, tmpDir, logFD, child);
    [4.32]
    [6.3335]
    openConnection(machine, tmpDir, logFD.get(), child);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 139
    [6.3336][4.88:111]()
    logFD.close();
    [6.3336]
    [6.23]
    logFD = -1;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 141
    [6.24][4.112:176]()
    FdSource from(child.from);
    FdSink to(child.to);
    [6.24]
    [6.3392]
    FdSource from(child.from.get());
    FdSink to(child.to.get());
  • replacement in src/hydra-queue-runner/build-remote.cc at line 371
    [4.9154][4.9154:9180]()
    child.to.close();
    [4.9154]
    [4.9180]
    child.to = -1;
  • replacement in src/hydra-queue-runner/build-result.cc at line 68
    [6.707][6.707:759]()
    if (!isInStore(product.path)) continue;
    [6.707]
    [6.2527]
    if (!store->isInStore(product.path)) continue;
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 14
    [6.5036][6.0:28]()
    #include "value-to-json.hh"
    [6.5036]
    [6.5036]
    #include "json.hh"
    #include "s3-binary-cache-store.hh"
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 455
    [6.2122][6.2122:2173]()
    if (dup2(fd, STDOUT_FILENO) == -1)
    [6.2122]
    [6.2173]
    if (dup2(fd.get(), STDOUT_FILENO) == -1)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 586
    [3.55][3.55:163]()
    root.attr("buildReadTimeAvgMs", nrBuildsRead == 0 ? 0.0 : (float) buildReadTimeMs / nrBuildsRead);
    [3.55]
    [6.1270]
    root.attr("buildReadTimeAvgMs", nrBuildsRead == 0 ? 0.0 : (float) buildReadTimeMs / nrBuildsRead);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 607
    [6.1638][6.1638:1709]()
    root.attr("machines");
    JSONObject nested(out);
    [6.1638]
    [6.1709]
    auto nested = root.object("machines");
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 612
    [6.4577][6.1796:1878](),[6.1796][6.1796:1878]()
    nested.attr(m->sshName);
    JSONObject nested2(out);
    [6.4577]
    [2.372]
    auto nested2 = nested.object(m->sshName);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 633
    [6.1740][6.1740:1810]()
    root.attr("jobsets");
    JSONObject nested(out);
    [6.1740]
    [6.1810]
    auto nested = root.object("jobsets");
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 636
    [6.1899][6.1899:2017]()
    nested.attr(jobset.first.first + ":" + jobset.first.second);
    JSONObject nested2(out);
    [6.1899]
    [6.1709]
    auto nested2 = nested.object(jobset.first.first + ":" + jobset.first.second);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 643
    [6.1946][6.1946:2021]()
    root.attr("machineTypes");
    JSONObject nested(out);
    [6.1946]
    [6.2021]
    auto nested = root.object("machineTypes");
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 646
    [6.2120][6.2120:2199]()
    nested.attr(i.first);
    JSONObject nested2(out);
    [6.2120]
    [6.2199]
    auto nested2 = nested.object(i.first);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 659
    [6.1782][5.158:218]()
    root.attr("store");
    JSONObject nested(out);
    [6.1782]
    [6.1857]
    auto nested = root.object("store");
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 686
    [5.1575][5.1575:1643]()
    nested.attr("s3");
    JSONObject nested2(out);
    [5.1575]
    [5.1643]
    auto nested2 = nested.object("s3");