hydra-queue-runner: Write GC roots for outputs paths

[?]
Oct 12, 2017, 4:55 PM
YXYXJDMBKFCIM4AIKCGJROUK4U3RBK5OLCBPGLA5AGERRHLGHSGAC

Dependencies

  • [2] FHVJYJFE Upload build logs to the binary cache
  • [*] MHVIT4JY Split hydra-queue-runner.cc more
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] NSBNNM77 Add hydra.conf option "nar_buffer_size" to configure memoryTokens limit
  • [*] BRAESISH Warn if PostgreSQL appears stalled
  • [*] HJOEIMLR Refactor
  • [*] 7LWB2J2Z Periodically clear orphaned build steps

Change contents

  • edit in src/hydra-queue-runner/builder.cc at line 266
    [4.5815]
    [4.5815]
    for (auto & path : step->drv.outputPaths())
    writeFile(rootsDir + "/" + baseNameOf(path), "");
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 90
    [2.775]
    [6.1572]
    , rootsDir(config->getStrOption("gc_roots_dir", fmt("%s/gcroots/per-user/%s/hydra-roots", settings.nixStateDir, getEnv("USER"))))
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 224
    [4.24983]
    [7.707]
    for (auto & path : drv.outputPaths())
    writeFile(rootsDir + "/" + baseNameOf(path), "");
  • edit in src/hydra-queue-runner/state.hh at line 439
    [9.1951]
    [8.6778]
    /* Where to store GC roots. Defaults to
    /nix/var/nix/gcroots/per-user/$USER/hydra-roots, overridable
    via gc_roots_dir. */
    nix::Path rootsDir;