hydra-queue-runner: --build-one: correctly handle a cached build

[?]
Mar 16, 2021, 8:09 PM
SSOJX6VZ5J2CKZHCBOWMIOVPOD2KLAJQBAEH74Q3EYAXXTTX625QC

Dependencies

  • [2] TDWT5RLH Periodically clear Store's path info cache
  • [3] NJXD2ABJ Abort unsupported build steps
  • [4] U55WNIDP Abort unsupported build steps
  • [5] HJOEIMLR Refactor
  • [6] EBJP3MNA Build against nix-master
  • [7] GJV2J5HX Pool local store connections
  • [8] NYTT5WP3 Keep track of the number of unsupported steps
  • [9] WV4SSAIY Build against nix-master
  • [10] OPN3PED2 Tweak
  • [11] RND7XFNH getQueuedBuilds(): Periodically stop to handle priority bumps
  • [12] HTDANBLN Merge pull request #730 from NixOS/flake
  • [13] NKQOEVVP Get rid of "will retry" messages after "maybe cancelling..."
  • [14] BRAESISH Warn if PostgreSQL appears stalled
  • [15] EPWEMRI2 Allow determinism checking for entire jobsets
  • [16] MJL3PDXI Fix duplicate step_finished notification
  • [17] IKJBYIGY Update to reflect BinaryCacheStore changes
  • [18] 73YR46NJ hydra-queue-runner: Write directly to a binary cache
  • [19] UYUVQWXQ Fix hydra-queue-runner --build-one
  • [20] UNVMKJV5 Unify build and step status codes
  • [21] B2L4T3X6 Sync with Nix
  • [22] MHVIT4JY Split hydra-queue-runner.cc more
  • [23] LVQXQIYA Kill active build steps when builds are cancelled
  • [24] 7LWB2J2Z Periodically clear orphaned build steps
  • [25] OBOTGFG6 Prevent orphaned build steps
  • [26] IK2UBDAU Revive jobset scheduling
  • [*] YTAYNN7V Queue monitor: Bail out earlier if a step has failed previously
  • [*] EYR3EW6J Keep stats for the Hydra auto scaler

Change contents

  • replacement in src/hydra-queue-runner/builder.cc at line 151
    [5.3421][5.4871:4942]()
    bool quit = buildId == buildOne && step->drvPath == *buildDrvPath;
    [5.3421]
    [5.3460]
    if (!buildOneDone)
    buildOneDone = buildId == buildOne && step->drvPath == *buildDrvPath;
  • replacement in src/hydra-queue-runner/builder.cc at line 269
    [5.316][5.5713:5744](),[5.5713][5.5713:5744]()
    if (quit) exit(1);
    [5.316]
    [5.269]
    if (buildOneDone) exit(1);
  • replacement in src/hydra-queue-runner/builder.cc at line 380
    [3.11][3.11:88]()
    failStep(*conn, step, buildId, result, machine, stepFinished, quit);
    [3.11]
    [5.303]
    failStep(*conn, step, buildId, result, machine, stepFinished);
  • replacement in src/hydra-queue-runner/builder.cc at line 390
    [5.9446][4.450:520]()
    if (quit) exit(0); // testing hack; FIXME: this won't run plugins
    [5.9446]
    [5.9489]
    if (buildOneDone) exit(0); // testing hack; FIXME: this won't run plugins
  • replacement in src/hydra-queue-runner/builder.cc at line 402
    [3.685][3.685:727]()
    bool & stepFinished,
    bool & quit)
    [3.685]
    [3.727]
    bool & stepFinished)
  • replacement in src/hydra-queue-runner/builder.cc at line 484
    [4.4154][4.4154:4202]()
    if (buildOne == b->id) quit = true;
    [4.4154]
    [4.4202]
    if (!buildOneDone && buildOne == b->id) buildOneDone = true;
  • edit in src/hydra-queue-runner/dispatcher.cc at line 377
    [4.6146][4.6146:6177]()
    bool quit = false;
  • replacement in src/hydra-queue-runner/dispatcher.cc at line 387
    [4.6527][4.6527:6573]()
    nullptr, stepFinished, quit);
    [4.6527]
    [4.6573]
    nullptr, stepFinished);
  • replacement in src/hydra-queue-runner/dispatcher.cc at line 389
    [4.6574][4.6574:6605]()
    if (quit) exit(1);
    [4.6574]
    [4.6605]
    if (buildOneDone) exit(1);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 38
    [5.20801][5.20801:20820]()
    while (true) {
    [5.20801]
    [2.0]
    bool quit = false;
    while (!quit) {
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 44
    [5.20873]
    [5.20873]
    if (buildOne && buildOneDone) quit = true;
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 48
    [5.20964][5.65:85]()
    if (done) {
    [5.20964]
    [5.85]
    if (done && !quit) {
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 71
    [5.21508]
    [5.21508]
    exit(0);
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 168
    [28.514]
    [5.7406]
    if (!buildOneDone && build->id == buildOne) buildOneDone = true;
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 240
    [5.25051]
    [5.7391]
    if (!buildOneDone && build->id == buildOne) buildOneDone = true;
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 299
    [5.28622]
    [5.28622]
    if (buildOne && newRunnable.size() == 0) buildOneDone = true;
  • edit in src/hydra-queue-runner/state.hh at line 370
    [5.6777]
    [29.2499]
    bool buildOneDone = false;
  • replacement in src/hydra-queue-runner/state.hh at line 489
    [4.7478][4.7478:7529]()
    bool & stepFinished,
    bool & quit);
    [4.7478]
    [4.7529]
    bool & stepFinished);