Immediately abort builds that require an unsupported system type

[?]
Jun 15, 2015, 12:51 PM
N5O7VEEOY2IE27VCOYRBG7YCY3K7JMQEDEMRT4OQ2MUE3NWULHHQC

Dependencies

  • [2] 2IQRXLWE Support cancelling builds
  • [3] 24BMQDZA Start of single-process hydra-queue-runner
  • [4] RYTQLATY Keep track of failed paths in the Hydra database
  • [5] YZAI5GQU Implement a database connection pool
  • [6] 5AIYUMTB Basic remote building
  • [7] ENXUSMSV Make concurrency more robust
  • [8] NJJ7H64S Very basic multi-threaded queue runner

Change contents

  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 130
    [3.6293]
    [3.745]
    }
    bool supportsStep(Step::ptr step)
    {
    if (systemTypes.find(step->drv.platform) == systemTypes.end()) return false;
    // FIXME: check features
    return true;
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 462
    [3.10582][3.9797:9876]()
    printMsg(lvlInfo, format("aborting GC'ed build %1%") % build->id);
    [3.10582]
    [2.396]
    printMsg(lvlError, format("aborting GC'ed build %1%") % build->id);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 489
    [3.11402]
    [3.11402]
    continue;
    }
    /* If any step has an unsupported system type, then fail the
    build. */
    bool allSupported = true;
    for (auto & r : newRunnable) {
    bool supported = false;
    {
    auto machines_(machines.lock()); // FIXME: use shared_mutex
    for (auto & m : *machines_)
    if (m->supportsStep(r)) { supported = true; break; }
    }
    if (!supported) { allSupported = false; break; }
    }
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 506
    [3.11403]
    [3.11403]
    if (!allSupported) {
    printMsg(lvlError, format("aborting unsupported build %1%") % build->id);
    pqxx::work txn(conn);
    txn.parameterized
    ("update Builds set finished = 1, busy = 0, buildStatus = $2, startTime = $3, stopTime = $3, errorMsg = $4 where id = $1")
    (build->id)
    ((int) bsAborted)
    (time(0))
    ("unsupported system type").exec();
    txn.commit();
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 799
    [3.12079][3.12079:12182]()
    if (!has(machine->systemTypes, step->drv.platform)) continue;
    // FIXME: check features
    [3.12079]
    [3.12182]
    if (!machine->supportsStep(step)) continue;