Merge pull request #692 from knl/emit-hostname-with-influxdb-metrics

[?]
Jun 10, 2020, 8:57 AM
FIXNWFBI2YFUIFORDB7SI3M5VY5HARNJY4RRPKT6MH7TIKMMPB6AC

Dependencies

  • [2] FF2NJA6U Remove outdated email address
  • [3] 4TIPQYBC Remove tabs
  • [4] XCXMK24U Keep track of the number of unsupported steps
  • [5] IZOT24A3 Don't spam the journal with hydra-queue-runner status dumps
  • [6] MJJCYVAN Remove tabs
  • [7] NYTT5WP3 Keep track of the number of unsupported steps
  • [8] MHVIT4JY Split hydra-queue-runner.cc more
  • [9] WV4SSAIY Build against nix-master
  • [10] VFFSFXJJ Remove outdated email address
  • [11] OG3Z3QGC Namespace cleanup
  • [12] UHMUHQMU hydra: fix tarball build, add pre suffix to tarballs
  • [13] N4IROACV Move buildRemote() into State
  • [14] ZB3JV52W Add a "My jobsets" tab to the dashboard
  • [15] EBJP3MNA Build against nix-master
  • [16] FV2M6MOT hydra: use autoconf/-make
  • [17] DWFTK56E Keep track of how many threads are waiting
  • [18] XQ3YV2T3 Don't pollute the source directory
  • [19] RKW3XA4U Fix potential race in dispatcher wakeup
  • [20] INVXGPNK Fix root creation when the root already exists but is owned by another user
  • [21] HJOEIMLR Refactor
  • [22] TTBLPQAJ Keep track of wait time per system type
  • [23] UVNTWTWG Prevent download of NARs we just uploaded
  • [24] NAYQT2GT hydra-queue-runner: Use cmdBuildDerivation
  • [25] QNX2BXVA hydra: Improve `AC_INIT' call.
  • [26] 46ADBTMQ Start steps in order of ascending build ID
  • [27] U55WNIDP Abort unsupported build steps
  • [28] BG6PEOB2 Make the output size limit configurable
  • [29] 7LU6ECB5 Don't spam the journal with hydra-queue-runner status dumps
  • [30] IK2UBDAU Revive jobset scheduling
  • [31] EYR3EW6J Keep stats for the Hydra auto scaler
  • [32] 4I2HF4L3 Unindent
  • [33] GUW56QXG Add evaluation error status to evaluation time on project jobset tab.
  • [34] NJXD2ABJ Abort unsupported build steps
  • [*] IK53RV4V

Change contents

  • edit in configure.ac at line 1
    [8.15951][2.0:74]()
    AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX])])
  • resolve order conflict in src/hydra-queue-runner/dispatcher.cc at line 304
    [8.4430]
    [8.4410]
  • edit in src/hydra-queue-runner/dispatcher.cc at line 305
    [8.4411][8.4411:4435](),[8.4430][8.19812:19813](),[8.4435][8.19812:19813](),[8.4651][8.19812:19813](),[8.19812][8.19812:19813]()
    abortUnsupported();
  • edit in src/hydra-queue-runner/dispatcher.cc at line 317
    [8.19999][8.4431:4636]()
    void State::abortUnsupported()
    {
    /* Make a copy of 'runnable' and 'machines' so we don't block them
    very long. */
    auto runnable2 = *runnable.lock();
    auto machines2 = *machines.lock();
  • edit in src/hydra-queue-runner/dispatcher.cc at line 318
    [8.4637][8.4637:4718]()
    system_time now = std::chrono::system_clock::now();
    auto now2 = time(0);
  • resolve order conflict in src/hydra-queue-runner/dispatcher.cc at line 318
    [8.4637]
    [8.4436]
  • edit in src/hydra-queue-runner/dispatcher.cc at line 319
    [8.4437][8.4437:4438]()
  • edit in src/hydra-queue-runner/dispatcher.cc at line 332
    [8.1305][8.4724:4767](),[8.4767][7.0:23](),[7.23][8.1305:1306](),[4.23][8.1305:1306](),[8.4762][8.1305:1306](),[8.4767][8.1305:1306](),[8.1305][8.1305:1306](),[8.1306][8.4763:5131](),[8.5131][4.24:70](),[4.70][8.5131:6901](),[8.5131][8.5131:6901]()
    std::unordered_set<Step::ptr> aborted;
    size_t count = 0;
    for (auto & wstep : runnable2) {
    auto step(wstep.lock());
    if (!step) continue;
    bool supported = false;
    for (auto & machine : machines2) {
    if (machine.second->supportsStep(step)) {
    step->state.lock()->lastSupported = now;
    supported = true;
    break;
    }
    }
    if (!supported)
    count++;
    if (!supported
    && std::chrono::duration_cast<std::chrono::seconds>(now - step->state.lock()->lastSupported).count() >= maxUnsupportedTime)
    {
    printError("aborting unsupported build step '%s' (type '%s')",
    localStore->printStorePath(step->drvPath),
    step->systemType);
    aborted.insert(step);
    auto conn(dbPool.get());
    std::set<Build::ptr> dependents;
    std::set<Step::ptr> steps;
    getDependents(step, dependents, steps);
    /* Maybe the step got cancelled. */
    if (dependents.empty()) continue;
    /* Find the build that has this step as the top-level (if
    any). */
    Build::ptr build;
    for (auto build2 : dependents) {
    if (build2->drvPath == step->drvPath)
    build = build2;
    }
    if (!build) build = *dependents.begin();
    bool stepFinished = false;
    bool quit = false;
    failStep(
    *conn, step, build->id,
    RemoteResult {
    .stepStatus = bsUnsupported,
    .errorMsg = fmt("unsupported system type '%s'",
    step->systemType),
    .startTime = now2,
    .stopTime = now2,
    },
    nullptr, stepFinished, quit);
    if (quit) exit(1);
    }
    }
    /* Clean up 'runnable'. */
    {
    auto runnable_(runnable.lock());
    for (auto i = runnable_->begin(); i != runnable_->end(); ) {
    if (aborted.count(i->lock()))
    i = runnable_->erase(i);
    else
    ++i;
    }
    }
  • resolve order conflict in src/hydra-queue-runner/dispatcher.cc at line 332
    [4.23]
    [4.71]
  • edit in src/hydra-queue-runner/dispatcher.cc at line 333
    [4.72][4.72:104](),[4.104][8.6901:6905](),[8.6901][8.6901:6905]()
    nrUnsupportedSteps = count;
    }
  • resolve order conflict in src/hydra-queue-runner/dispatcher.cc at line 333
    [4.72]
    [8.4768]
  • edit in src/hydra-queue-runner/state.hh at line 72
    [8.3662][8.7000:7036]()
    BuildStatus buildStatus() const
  • resolve order conflict in src/hydra-queue-runner/state.hh at line 72
    [8.7017]
    [8.3682]
  • edit in src/hydra-queue-runner/state.hh at line 201
    [8.1366][8.7018:7175]()
    /* The time that we last saw a machine that supports this
    step. */
    system_time lastSupported = std::chrono::system_clock::now();
  • edit in src/hydra-queue-runner/state.hh at line 313
    [8.4357][8.7197:7315]()
    /* Time in seconds before unsupported build steps are aborted. */
    const unsigned int maxUnsupportedTime = 0;
  • resolve order conflict in src/hydra-queue-runner/state.hh at line 313
    [8.7294]
    [8.404]
  • edit in src/hydra-queue-runner/state.hh at line 358
    [8.337][4.167:202]()
    counter nrUnsupportedSteps{0};
  • edit in src/hydra-queue-runner/state.hh at line 490
    [8.8032][8.7295:7509]()
    void failStep(
    Connection & conn,
    Step::ptr step,
    BuildID buildId,
    const RemoteResult & result,
    Machine::ptr machine,
    bool & stepFinished,
    bool & quit);
  • edit in src/hydra-queue-runner/state.hh at line 516
    [8.8187][8.7510:7540]()
    void abortUnsupported();
  • edit in src/hydra-queue-runner/state.hh at line 546
    [8.9059][5.151:191]()
    void dumpStatus(Connection & conn);
  • edit in src/root/common.tt at line 591
    [8.37][6.0:241]()
    INCLUDE renderDateTime timestamp = j.lastcheckedtime;
    IF j.errormsg || j.fetcherrormsg; %]&nbsp;<span class = 'label label-warning'>Error</span>[% END;
    ELSE; "-";
    END %]</td>
  • resolve order conflict in src/root/common.tt at line 591
    [3.241]
    [8.2298]