Fix build with latest Nix

[?]
Sep 26, 2020, 9:37 PM
W7OCNTLFXNRGEHMQ5WBX4Z2Q6II3APKTLNWH76ZYZNRZDEVQACLAC

Dependencies

  • [2] 6NUK6AZA Fix build
  • [3] 24BMQDZA Start of single-process hydra-queue-runner
  • [4] UQQ4IL55 Add a error type for "unsupported system type"
  • [5] DKJFD6JN Process Nix API changes
  • [6] BYVRA54Q Temporarily disable machines on any exception, not just connection failures
  • [7] IWB3F4Z6 Fail builds with previously failed steps early
  • [8] WV4SSAIY Build against nix-master
  • [9] XIFDDTXZ Don't lock the BuildSteps table when inserting
  • [10] DKR2GXSA Update libpqxx usage to move away from deprecated API interactions.
  • [11] YSZQ3ORR Fix build
  • [12] SL3WSRAC hydra-queue-runner: Limit memory usage
  • [13] IKJBYIGY Update to reflect BinaryCacheStore changes
  • [14] NJJ7H64S Very basic multi-threaded queue runner
  • [15] VQISTKOP hydra-queue-runner: Use substitutes
  • [16] BAFICF73 Support hydra-build-products on binary cache stores
  • [17] SJTXNMXU Remove added strictness to allow multiple query returns.
  • [18] WDGARQ76 Reuse build products / metrics stored in the database
  • [19] 3A7HTJZP Merge branch 'master' into libpqxx_undeprecate
  • [20] ACBS7C6Q hydra-queue-runner: Detect changes to the scheduling shares
  • [21] LVQXQIYA Kill active build steps when builds are cancelled
  • [22] YTAYNN7V Queue monitor: Bail out earlier if a step has failed previously
  • [23] BOCPRQ6E Fix build against latest Nix
  • [24] HTDANBLN Merge pull request #730 from NixOS/flake
  • [25] H46LUUZY hydra-queue-runner: don't try to distribute builds on localhost
  • [26] NAYQT2GT hydra-queue-runner: Use cmdBuildDerivation
  • [27] 5AIYUMTB Basic remote building
  • [28] PQFOMNTL hydra-queue-runner: More stats
  • [29] 73YR46NJ hydra-queue-runner: Write directly to a binary cache
  • [30] EBJP3MNA Build against nix-master
  • [31] YXYXJDMB hydra-queue-runner: Write GC roots for outputs paths
  • [32] 62MQPRXC Pass null values to libpqxx properly
  • [33] BG6PEOB2 Make the output size limit configurable
  • [34] INVXGPNK Fix root creation when the root already exists but is owned by another user
  • [35] NJXD2ABJ Abort unsupported build steps
  • [36] OBOTGFG6 Prevent orphaned build steps
  • [37] MHVIT4JY Split hydra-queue-runner.cc more
  • [38] BRAESISH Warn if PostgreSQL appears stalled
  • [39] QHO6IDC7 Fix build
  • [40] U55WNIDP Abort unsupported build steps
  • [41] KBZHIGLG Record the machine used for a build step
  • [*] NQPGIRXX Revert "hydra-eval-jobs -> nix eval-hydra-jobs"

Change contents

  • edit in src/hydra-eval-jobs/hydra-eval-jobs.cc at line 3
    [43.566]
    [43.623]
    #include <thread>
  • replacement in src/hydra-queue-runner/build-remote.cc at line 266
    [2.886][2.886:1054]()
    auto outPath = i->path(*localStore, drv2.name);
    inputs.insert(outPath);
    basicDrv.inputSrcs.insert(outPath);
    [2.886]
    [2.1054]
    auto outPath = i->path(*localStore, drv2.name, name);
    inputs.insert(*outPath);
    basicDrv.inputSrcs.insert(*outPath);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 437
    [3.2001][2.1073:1137]()
    auto outputs = step->drv->outputPaths(*localStore);
    [3.2001]
    [3.46]
    StorePathSet outputs;
    for (auto & i : step->drv->outputsAndOptPaths(*localStore)) {
    if (i.second.second)
    outputs.insert(*i.second.second);
    }
  • replacement in src/hydra-queue-runner/build-result.cc at line 19
    [3.666][2.1138:1182]()
    auto outputs = drv.outputPaths(*store);
    [3.666]
    [3.3288]
    StorePathSet outputs;
  • replacement in src/hydra-queue-runner/build-result.cc at line 21
    [3.2807][3.790:824](),[3.3314][3.790:824](),[3.790][3.790:824](),[3.824][3.1303:1353]()
    for (auto & output : outputs)
    store->computeFSClosure(output, closure);
    [3.3314]
    [3.875]
    for (auto & i : drv.outputsAndOptPaths(*store))
    if (i.second.second) {
    store->computeFSClosure(*i.second.second, closure);
    outputs.insert(*i.second.second);
    }
  • replacement in src/hydra-queue-runner/build-result.cc at line 110
    [3.3368][3.3368:3412]()
    for (auto & output : drv.outputs) {
    [3.3368]
    [3.3412]
    for (auto & [name, output] : drv.outputs) {
  • replacement in src/hydra-queue-runner/build-result.cc at line 112
    [3.3446][2.1183:1307]()
    auto outPath = output.second.path(*store, drv.name);
    product.path = store->printStorePath(outPath);
    [3.3446]
    [3.3493]
    auto outPath = output.path(*store, drv.name, name);
    product.path = store->printStorePath(*outPath);
  • replacement in src/hydra-queue-runner/build-result.cc at line 115
    [3.3533][3.3533:3606](),[3.3606][2.1308:1351]()
    product.subtype = output.first == "out" ? "" : output.first;
    product.name = outPath.name();
    [3.3533]
    [3.3664]
    product.subtype = name == "out" ? "" : name;
    product.name = outPath->name();
  • replacement in src/hydra-queue-runner/builder.cc at line 277
    [3.5815][2.1429:1493](),[2.1493][3.0:27](),[3.4908][3.0:27](),[3.5415][3.0:27](),[3.52][3.0:27]()
    for (auto & path : step->drv->outputPaths(*localStore))
    addRoot(path);
    [3.5815]
    [3.114]
    for (auto & i : step->drv->outputsAndOptPaths(*localStore)) {
    if (i.second.second)
    addRoot(*i.second.second);
    }
  • replacement in src/hydra-queue-runner/builder.cc at line 468
    [3.3635][2.1494:1566](),[3.61][3.653:764](),[2.1566][3.653:764](),[3.653][3.653:764]()
    for (auto & path : step->drv->outputPaths(*localStore))
    txn.exec_params0("insert into FailedPaths values ($1)", localStore->printStorePath(path));
    [3.3635]
    [3.3815]
    for (auto & i : step->drv->outputsAndOptPaths(*localStore))
    if (i.second.second)
    txn.exec_params0("insert into FailedPaths values ($1)", localStore->printStorePath(*i.second.second));
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 259
    [3.8997][3.93:138]()
    for (auto & output : step->drv->outputs)
    [3.8997]
    [3.3251]
    for (auto & [name, output] : step->drv->outputs)
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 262
    [3.3373][2.1567:1689]()
    buildId, stepNr, output.first, localStore->printStorePath(output.second.path(*localStore, step->drv->name)));
    [3.3373]
    [3.9238]
    buildId, stepNr, name, localStore->printStorePath(*output.path(*localStore, step->drv->name, name)));
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 443
    [3.1390][2.1892:1952](),[3.188][3.1153:1270](),[2.1952][3.1153:1270](),[3.1153][3.1153:1270](),[3.1270][3.44:44](),[3.44][3.1535:1560](),[3.1270][3.1535:1560](),[3.6557][3.1535:1560](),[3.6972][3.1535:1560](),[3.6999][3.1535:1560](),[3.7064][3.1535:1560](),[3.1535][3.1535:1560]()
    for (auto & path : step->drv->outputPaths(*localStore))
    if (!txn.exec_params("select 1 from FailedPaths where path = $1", localStore->printStorePath(path)).empty())
    return true;
    [3.1390]
    [3.1560]
    for (auto & i : step->drv->outputsAndOptPaths(*localStore))
    if (i.second.second)
    if (!txn.exec_params("select 1 from FailedPaths where path = $1", localStore->printStorePath(*i.second.second)).empty())
    return true;
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 179
    [3.1276][2.2076:2159](),[3.324][3.8047:8281](),[3.1408][3.8047:8281](),[2.2159][3.8047:8281](),[3.1341][3.8047:8281](),[3.8281][2.2160:2226](),[3.1489][3.1634:1791](),[2.2226][3.1634:1791](),[3.7287][3.1634:1791](),[3.7794][3.1634:1791](),[3.8331][3.1634:1791](),[3.1634][3.1634:1791]()
    for (auto & output : ex.step->drv->outputPaths(*localStore)) {
    auto res = txn.exec_params
    ("select max(s.build) from BuildSteps s join BuildStepOutputs o on s.build = o.build where path = $1 and startTime != 0 and stopTime != 0 and status = 1",
    localStore->printStorePath(output));
    if (!res[0][0].is_null()) {
    propagatedFrom = res[0][0].as<BuildID>();
    break;
    [3.1276]
    [3.1791]
    for (auto & i : ex.step->drv->outputsAndOptPaths(*localStore)) {
    if (i.second.second) {
    auto res = txn.exec_params
    ("select max(s.build) from BuildSteps s join BuildStepOutputs o on s.build = o.build where path = $1 and startTime != 0 and stopTime != 0 and status = 1",
    localStore->printStorePath(*i.second.second));
    if (!res[0][0].is_null()) {
    propagatedFrom = res[0][0].as<BuildID>();
    break;
    }
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 226
    [3.24983][2.2295:2356](),[2.2356][3.269:300](),[3.301][3.269:300]()
    for (auto & path : drv.outputPaths(*localStore))
    addRoot(path);
    [3.24983]
    [3.367]
    for (auto & i : drv.outputsAndOptPaths(*localStore))
    if (i.second.second)
    addRoot(*i.second.second);
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 459
    [3.31904][2.2441:2497]()
    auto outputs = step->drv->outputPaths(*localStore);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 461
    [3.8860][2.2498:2582]()
    if (!destStore->isValidPath(i.second.path(*localStore, step->drv->name))) {
    [3.8860]
    [3.31995]
    if (!destStore->isValidPath(*i.second.path(*localStore, step->drv->name, i.first))) {
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 472
    [3.763][2.2583:2732]()
    auto path = i.second.path(*localStore, step->drv->name);
    if (/* localStore != destStore && */ localStore->isValidPath(path))
    [3.763]
    [3.852]
    auto path = i.second.path(*localStore, step->drv->name, i.first);
    if (/* localStore != destStore && */ localStore->isValidPath(*path))
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 477
    [3.962][2.2733:2811]()
    localStore->querySubstitutablePathInfos({{path, {}}}, infos);
    [3.962]
    [3.1043]
    localStore->querySubstitutablePathInfos({{*path, {}}}, infos);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 486
    [3.2301][2.2812:2885]()
    auto path = i.second.path(*localStore, step->drv->name);
    [3.2301]
    [2.2885]
    auto path = i.second.path(*localStore, step->drv->name, i.first);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 491
    [3.1215][2.2887:2942]()
    if (localStore->isValidPath(path))
    [3.1215]
    [3.9624]
    if (localStore->isValidPath(*path))
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 493
    [3.9716][2.2943:3005]()
    localStore->printStorePath(path),
    [3.9716]
    [3.9787]
    localStore->printStorePath(*path),
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 497
    [3.9427][2.3006:3068]()
    localStore->printStorePath(path),
    [3.9427]
    [3.9498]
    localStore->printStorePath(*path),
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 499
    [3.9564][2.3069:3123]()
    localStore->ensurePath(path);
    [3.9564]
    [3.1591]
    localStore->ensurePath(*path);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 503
    [3.1700][2.3124:3200]()
    copyClosure(ref<Store>(localStore), destStore, {path});
    [3.1700]
    [3.2442]
    copyClosure(ref<Store>(localStore), destStore, {*path});
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 510
    [3.2661][2.3201:3304]()
    createSubstitutionStep(txn, startTime, stopTime, build, drvPath, "out", path);
    [3.2661]
    [3.2773]
    createSubstitutionStep(txn, startTime, stopTime, build, drvPath, "out", *path);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 516
    [3.10260][2.3305:3363]()
    localStore->printStorePath(path),
    [3.10260]
    [3.10327]
    localStore->printStorePath(*path),
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 622
    [3.240][2.3364:3421]()
    for (auto & output : drv.outputPaths(*localStore)) {
    [3.240]
    [3.0]
    for (auto & [name, output] : drv.outputsAndOptPaths(*localStore)) {
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 627
    [3.9180][2.3422:3472]()
    localStore->printStorePath(output));
    [3.9180]
    [3.585]
    localStore->printStorePath(*output.second));