Write Hydra roots as regular files instead of symlinks

[?]
Aug 1, 2014, 3:24 PM
4LL3WLONJMVWQTRRWQYJQ2XAZKF2FYRU4IZ7WGRH6YL3PZITVH2QC

Dependencies

  • [2] NCYM2P3D Derivations with multiple outputs break the 'link name is store path' assumption
  • [3] DKINJZTI Fix hydra-update-gc-roots
  • [4] 3D3F5I74 Fix race between hydra-eval-jobs and hydra-update-gc-roots
  • [5] 2T42QGZD * Register builds as GC roots so they don't get deleted.
  • [6] UGA45FNC Add a plugin for backing up builds in s3
  • [7] IN272KZW * Automatically keep all builds in the latest successful release in
  • [8] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept
  • [9] A63IHCMX * Register GC roots properly.
  • [10] F5RYSE7T qualify order by column
  • [*] 2GK5DOU7 * Downloading closures.

Change contents

  • edit in src/lib/Hydra/Helper/Nix.pm at line 81
    [4.931][4.134:135]()
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 82
    [4.968][4.136:137](),[4.137][4.369:420](),[4.369][4.369:420](),[4.420][4.969:1032](),[4.1032][4.488:494](),[4.488][4.488:494]()
    if (!-l $link) {
    symlink($path, $link)
    or die "cannot create GC root `$link' to `$path'";
    }
    [4.968]
    [4.751]
    open ROOT, ">$link" or die "cannot create GC root `$link' to `$path'";
    close ROOT;
  • replacement in src/script/hydra-s3-backup-collect-garbage at line 35
    [4.8512][2.0:54]()
    push @actual_roots, readlink "$gcRootsDir/$link";
    [4.8512]
    [4.8571]
    push @actual_roots, $Nix::Config::storeDir . "/" . $link;
  • replacement in src/script/hydra-update-gc-roots at line 133
    [4.261][3.0:59]()
    my $st = lstat("$gcRootsDir/$link");
    if (!defined $st) {
    [4.261]
    [3.59]
    my $st = lstat("$gcRootsDir/$link");
    if (!defined $st) {
  • replacement in src/script/hydra-update-gc-roots at line 136
    [3.113][3.113:159]()
    } elsif ($st->ctime < $now - 24 * 60 * 60) {
    [3.113]
    [4.318]
    } elsif ($st->ctime < $now - 24 * 60 * 60) {