Fix duplicate step_finished notification

[?]
Aug 12, 2019, 1:50 PM
MJL3PDXI4SC6SJSSETXPAX4CEPX7LQWNRPUDEV2O67UUIMDW25LAC

Dependencies

  • [2] EPWEMRI2 Allow determinism checking for entire jobsets
  • [3] TPNHTE5V Remove obsolete Builds columns and provide accurate "Running builds"
  • [4] MHVIT4JY Split hydra-queue-runner.cc more
  • [5] B7ENVLRS hydra-queue-runner: Make build notification more reliable
  • [6] BRAESISH Warn if PostgreSQL appears stalled
  • [7] BG6PEOB2 Make the output size limit configurable
  • [8] OBOTGFG6 Prevent orphaned build steps
  • [9] LVQXQIYA Kill active build steps when builds are cancelled
  • [10] 32KJOERM Turn hydra-notify into a daemon
  • [11] FITVNQ2S Keep track of the time we spend copying to/from build machines
  • [12] OPN3PED2 Tweak
  • [13] UNVMKJV5 Unify build and step status codes
  • [14] 7LWB2J2Z Periodically clear orphaned build steps
  • [15] NTEDD7T4 Provide a plugin hook for when build steps finish
  • [*] IK2UBDAU Revive jobset scheduling

Change contents

  • edit in src/hydra-queue-runner/builder.cc at line 230
    [3.4778]
    [17.0]
    /* For standard failures, we don't care about the error
    message. */
    if (result.stepStatus != bsAborted)
    result.errorMsg = "";
  • edit in src/hydra-queue-runner/builder.cc at line 248
    [3.4779]
    [3.5043]
    /* Finish the step in the database. */
    if (stepNr) {
    pqxx::work txn(*conn);
    finishBuildStep(txn, result, buildId, stepNr, machine->sshName);
    txn.commit();
    }
  • edit in src/hydra-queue-runner/builder.cc at line 268
    [3.79][3.254:268](),[3.79][3.5501:5536](),[3.268][3.5501:5536](),[3.5501][3.5501:5536](),[3.5536][2.1044:1121](),[3.79][3.5687:5713](),[3.172][3.5687:5713](),[2.1121][3.5687:5713](),[3.5687][3.5687:5713](),[3.5713][3.269:283]()
    {
    pqxx::work txn(*conn);
    finishBuildStep(txn, result, buildId, stepNr, machine->sshName);
    txn.commit();
    }
  • edit in src/hydra-queue-runner/builder.cc at line 321
    [3.7355][3.7355:7356](),[3.7356][2.1122:1203]()
    finishBuildStep(txn, result, buildId, stepNr, machine->sshName);
  • edit in src/hydra-queue-runner/builder.cc at line 377
    [3.9315][3.9315:9316](),[3.9316][3.138:303]()
    /* For standard failures, we don't care about the error
    message. */
    if (result.stepStatus != bsAborted)
    result.errorMsg = "";
  • edit in src/hydra-queue-runner/builder.cc at line 423
    [3.12003][3.364:477](),[3.477][2.1204:1289](),[2.1289][3.478:496](),[3.2505][3.478:496](),[3.3519][3.478:496](),[3.424][3.12211:12212](),[3.496][3.12211:12212](),[3.880][3.12211:12212](),[3.3519][3.12211:12212](),[3.12211][3.12211:12212]()
    if (result.stepStatus != bsCachedFailure && !stepFinished) {
    assert(stepNr);
    finishBuildStep(txn, result, buildId, stepNr, machine->sshName);
    }