* Register GC roots properly.
[?]
Mar 15, 2009, 11:56 AM
A63IHCMXH3F4V56HDXJLJVVHKXRSJCJMT2PWXXI2IW3J734J6SGQCDependencies
- [2]
S3ZLZP3N* Cut off builds after half an hour of apparent inactivity. This - [3]
BDSD2JLV* Speed up manifest generation. - [4]
SHZLOM5M* eval-jobs -> hydra_eval_jobs. - [5]
NEWDDAOF* Allow users to change the value of a build's "keep" flag, which - [6]
IN272KZW* Automatically keep all builds in the latest successful release in - [7]
H7CNGK4O* Log evaluation errors etc. in the DB. - [8]
WZ3AEJ67* hydra_update_gc_roots.pl registers build outputs that should be kept - [9]
4LWGZL33 - [10]
CLJQCY2X* Store info about all the build actions and allow them to be - [11]
37R34XJO* Negative caching: don't perform a build if a dependency already - [12]
AFTXA575* $HYDRA_DATA environment variable. - [13]
TLZ2SPBR - [14]
7YBYT2LQ - [15]
2T42QGZD* Register builds as GC roots so they don't get deleted. - [16]
X27GNHDV* Basic job info in the database. - [17]
4X6NS66Q* Keep the most recent builds for each job. - [18]
YGRLM2SK* Export all relevant info about the derivation. - [19]
POPU2ATH* hydra_scheduler: use eval-jobs. - [20]
BD3GRK4B* Get rid of "positive failures" and separate log phases. - [*]
4N5APGRG* Start of a helper tool to evaluate job expressions efficiently. - [*]
KD5237CU* eval-jobs now efficiently evaluates all Hydra jobs from a - [*]
2GK5DOU7* Downloading closures. - [*]
N22GPKYT* Put info about logs / build products in the DB.
Change contents
- edit in src/c/hydra_eval_jobs.cc at line 20
- edit in src/c/hydra_eval_jobs.cc at line 22
static Path gcRootsDir; - edit in src/c/hydra_eval_jobs.cc at line 24
- replacement in src/c/hydra_eval_jobs.cc at line 103
Path outPath, drvPath;Path drvPath; - replacement in src/c/hydra_eval_jobs.cc at line 108
xmlAttrs["drvPath"] = drv.queryDrvPath(state);xmlAttrs["drvPath"] = drvPath = drv.queryDrvPath(state); - edit in src/c/hydra_eval_jobs.cc at line 116
/* Register the derivation as a GC root. !!! Thisregisters roots for jobs that we may have alreadydone. */Path root = gcRootsDir + "/" + baseNameOf(drvPath);if (!pathExists(root)) addPermRoot(drvPath, root, false); - edit in src/c/hydra_eval_jobs.cc at line 182
else if (arg == "--gc-roots-dir") {if (i == args.end()) throw UsageError("missing argument");gcRootsDir = *i++;} - edit in src/c/hydra_eval_jobs.cc at line 193
if (gcRootsDir == "") throw UsageError("--gc-roots-dir not specified"); - replacement in src/lib/Hydra/Helper/Nix.pm at line 12
registerRoot getGCRootsDirregisterRoot getGCRootsDir gcRootFor - replacement in src/lib/Hydra/Helper/Nix.pm at line 83
return "/nix/var/nix/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";my $dir = "/nix/var/nix/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";mkpath $dir if !-e $dir;return $dir; - replacement in src/lib/Hydra/Helper/Nix.pm at line 89
sub registerRoot {sub gcRootFor { - edit in src/lib/Hydra/Helper/Nix.pm at line 91
return getGCRootsDir . basename $path;} - replacement in src/lib/Hydra/Helper/Nix.pm at line 94
my $gcRootsDir = getGCRootsDir;sub registerRoot {my ($path) = @_;my $link = gcRootFor $path; - edit in src/lib/Hydra/Helper/Nix.pm at line 100
mkpath($gcRootsDir) if !-e $gcRootsDir;my $link = "$gcRootsDir/" . basename $path; - replacement in src/lib/Hydra/Helper/Nix.pm at line 102
or die "cannot create symlink in $gcRootsDir to $path";or die "cannot create GC root `$link' to `$path'"; - edit in src/script/hydra_build.pl at line 30
registerRoot $outPath; - replacement in src/script/hydra_build.pl at line 76
"--log-type flat --print-build-trace --realise $drvPath 2>&1";"--log-type flat --print-build-trace --realise $drvPath " ."--add-root " . gcRootFor $outPath . " 2>&1"; - edit in src/script/hydra_scheduler.pl at line 270
# !!! this should really by done by nix-instantiate to prevent a GC race.registerRoot $drvPath; - replacement in src/script/hydra_scheduler.pl at line 330
"hydra_eval_jobs", $nixExprPath, inputsToArgs($inputInfo));"hydra_eval_jobs", $nixExprPath, "--gc-roots-dir", getGCRootsDir,inputsToArgs($inputInfo)); - edit in src/script/hydra_scheduler.pl at line 333
print STDERR "$stderr"; - replacement in src/script/hydra_update_gc_roots.pl at line 86
# For scheduled builds, we register the derivation and the output as a GC root.# For scheduled builds, we register the derivation as a GC root. - replacement in src/script/hydra_update_gc_roots.pl at line 93
registerRoot $build->outpath;registerRoot $build->outpath if -e $build->outpath;