Remove remaining references to store_mode etc.

[?]
Oct 18, 2017, 10:23 AM
CPSEZOSXXT5RILNUJI7LISBNIRQRBCNPJUHEA7PV4RSVQZALTRKQC

Dependencies

  • [2] YAD7524S Proxy local binary caches via hydra-server
  • [3] BCC6USHO hydra-server: Don't barf if the binary cache public key can't be read
  • [4] IT5AXPY2 Disable channels on binary cached based Hydra instances
  • [5] GIUGQKVR Fix .nixpkg channel uri
  • [6] PJD4HUOJ hydra-update-gc-roots: Only keep outputs when in direct mode
  • [7] CHI2EHBJ declarative projects: Pull jobset spec build from the remote store
  • [8] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [9] ON4DDIBZ * Forgot to commit.
  • [10] LBNVQXUB * Build the /build stuff in a separate controller.
  • [11] AFNDUSGD Set Expires headers for Hydra's binary cache
  • [12] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [13] 4X6NS66Q * Keep the most recent builds for each job.
  • [14] W3HI52QV use NIX_*_DIR env vars when defined
  • [15] UD2WKDUV Use queryPathFromHashPart to look up binary cache requests efficiently
  • [16] HAI5TY47 Make negative narinfo responses much smaller
  • [17] HLYVEJX7 * Keep the 3 most recent builds for every platform for every job.
  • [18] UOINKJ2J Add an action to cancel all builds in a jobset eval
  • [19] VHV6GI4L Add a jobset eval action to restart all aborted/cancelled builds
  • [20] YAT6VX54 hydra-update-gc-roots: Get Builds and BuildOutputs in the same query
  • [21] PMNWRTGJ Add multiple output support
  • [22] NLYDMDAX .nixpkgs: Drop obsolete manifest URI
  • [23] 5NO7NCKT * Refactoring.
  • [24] MNKXBLNC Return 410 Gone (rather than 500) if an output is no longer available
  • [25] 3TZGWQHO Allow downloading file by filename
  • [26] MT5HGXFP Hydra/62 fix, broken nar download
  • [27] V2YFPM72 Hackery to make downloads work when using a binary cache
  • [28] 7UHHF564 Security: Also check paths in the web server
  • [29] KJQWSRCC Speed up hydra-update-gc-roots
  • [30] J5UVLXOK * Start of a basic Catalyst web interface.
  • [31] XE6HD7BP Provide the nix-cache-info file required by the binary cache substituter
  • [32] MAOFG2TD * Allow omitting the product number if there is only one product in a
  • [33] MVB7RRLT * Move NARs from the NixChannel controller to the Root controller and
  • [34] GEADFVZ5 hydra-queue-runner: Improved scheduling
  • [35] TX7Q4RAS Add page showing latest build steps
  • [36] B3UW2ZRB Restart jobset evals efficiently
  • [37] UXVDOUBJ
  • [38] SLBM7H4Q hydra-update-gc-roots: Keep derivations of failed builds
  • [39] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter
  • [40] JAH3UPWA Support revision control systems via plugins
  • [*] HXBXDEFK Speed up channel processing
  • [*] XHVZXX6N
  • [*] LVJKRTIK * Generate a Nix expression for the channel.
  • [*] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept

Change contents

  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 56
    [8.269]
    [8.0]
    requireLocalStore($c);
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 74
    [8.677]
    [8.47]
    requireLocalStore($c);
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 92
    [42.1786]
    [43.132]
    requireLocalStore($c);
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 106
    [44.78]
    [8.221]
    requireLocalStore($c);
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 136
    [45.228]
    [42.2002]
    requireLocalStore($c);
  • replacement in src/lib/Hydra/Controller/Build.pm at line 68
    [8.29][8.29:88]()
    ($c->config->{store_mode} // "direct") eq "direct"
    [8.29]
    [8.88]
    isLocalStore
  • replacement in src/lib/Hydra/Controller/Build.pm at line 70
    [8.154][8.154:175]()
    : 1; # FIXME
    [8.154]
    [8.0]
    : 1;
  • edit in src/lib/Hydra/Controller/Build.pm at line 207
    [8.2573][8.333:1021](),[8.1021][3.0:282](),[3.282][8.1235:1346](),[8.1235][8.1235:1346]()
    # Hack to get downloads to work on binary cache stores: if the
    # store path is not available locally, then import it into the
    # local store. FIXME: find a better way; this can require an
    # unbounded amount of space.
    if (!isValidPath($storePath)) {
    my $storeMode = $c->config->{store_mode} // "direct";
    notFound($c, "File " . $product->path . " has disappeared.")
    if $storeMode eq "direct";
    my $url =
    $storeMode eq "local-binary-cache" ? "file://" . $c->config->{binary_cache_dir} :
    $storeMode eq "s3-binary-cache" ? "https://" . $c->config->{binary_cache_s3_bucket} . ".s3.amazonaws.com/" :
    die;
    my $args = "";
    if (defined $c->config->{binary_cache_public_key_file}
    && -r $c->config->{binary_cache_public_key_file})
    {
    $args = "--option binary-cache-public-keys " . read_file($c->config->{binary_cache_public_key_file});
    }
    system("nix-store --realise '$storePath' --option extra-binary-caches '$url' $args>/dev/null");
    }
  • edit in src/lib/Hydra/Controller/Root.pm at line 260
    [2.26][8.2637:2638](),[8.60][8.2637:2638](),[8.455][8.2637:2638](),[8.467][8.2637:2638](),[8.2637][8.2637:2638](),[8.2638][2.27:85]()
    my $storeMode = $c->config->{store_mode} // "direct";
  • replacement in src/lib/Hydra/Controller/Root.pm at line 261
    [8.603][2.86:129]()
    if ($storeMode eq "s3-binary-cache") {
    [8.603]
    [2.129]
    if (!isLocalStore) {
  • edit in src/lib/Hydra/Controller/Root.pm at line 263
    [2.185][2.185:346]()
    }
    elsif ($storeMode eq "local-binary-cache") {
    my $dir = $c->config->{binary_cache_dir};
    $c->serve_static_file($dir . "/nar/" . $path);
  • replacement in src/lib/Hydra/Controller/Root.pm at line 279
    [2.601][2.601:703]()
    my $storeMode = $c->config->{store_mode} // "direct";
    if ($storeMode eq "s3-binary-cache") {
    [2.601]
    [2.703]
    if (!isLocalStore) {
  • edit in src/lib/Hydra/Controller/Root.pm at line 283
    [2.766][2.766:929]()
    elsif ($storeMode eq "local-binary-cache") {
    my $dir = $c->config->{binary_cache_dir};
    $c->serve_static_file($dir . "/nix-cache-info");
    }
  • replacement in src/lib/Hydra/Controller/Root.pm at line 300
    [8.125][2.1378:1436](),[2.1436][8.470:471](),[8.470][8.470:471](),[8.471][2.1437:1480]()
    my $storeMode = $c->config->{store_mode} // "direct";
    if ($storeMode eq "s3-binary-cache") {
    [8.125]
    [2.1480]
    if (!isLocalStore) {
  • edit in src/lib/Hydra/Controller/Root.pm at line 302
    [2.1536][2.1536:1723]()
    }
    elsif ($storeMode eq "local-binary-cache") {
    my $dir = $c->config->{binary_cache_dir};
    $c->serve_static_file($dir . "/" . $c->req->captures->[0] . ".narinfo");
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 350
    [4.238][4.238:374]()
    notFound($c, "Nix channels are not supported by this Hydra server.")
    if ($c->config->{store_mode} // "direct") ne "direct";
    [4.238]
    [8.311]
    notFound($c, "Nix channels are not supported by this Hydra server.") if !Hydra::Helper::Nix::isLocalStore();
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 26
    [8.1050][7.47:78]()
    getTotalShares readNixFile
    [8.1050]
    [8.688]
    getTotalShares
    getStoreUri
    readNixFile
    isLocalStore
  • edit in src/lib/Hydra/Helper/Nix.pm at line 497
    [7.580]
    [7.580]
    sub getStoreUri {
    my $config = getHydraConfig();
    return $config->{'store_uri'} // "auto";
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 506
    [7.670][7.670:847]()
    my $config = getHydraConfig();
    my $storeUri = $config->{'store_uri'} // "";
    return grab(cmd => ["nix", "cat-store", "$path"], env => { NIX_REMOTE => "$storeUri" });
    [7.670]
    [8.1616]
    return grab(cmd => ["nix", "cat-store", "--store", getStoreUri(), "$path"]);
    }
    sub isLocalStore {
    my $uri = getStoreUri();
    return $uri =~ "^(local|daemon|auto)";
  • edit in src/lib/Hydra/View/NixPkg.pm at line 5
    [8.73]
    [8.73]
    use Hydra::Helper::CatalystUtils;
  • replacement in src/lib/Hydra/View/NixPkg.pm at line 14
    [8.211][5.0:335]()
    my $storeMode = $c->config->{store_mode} // "direct";
    my $channelUri =
    $storeMode eq "direct" ? $c->uri_for('/')
    : $storeMode eq "s3-binary-cache" ?
    ($c->config->{binary_cache_public_uri} // ("https://" . $c->config->{binary_cache_s3_bucket} . ".s3.amazonaws.com/"))
    : die "Not supported.\n";
    [8.211]
    [5.335]
    requireLocalStore($c);
    my $channelUri = $c->uri_for('/');
  • replacement in src/script/hydra-update-gc-roots at line 41
    [8.106][6.32:91]()
    if (($config->{store_mode} // "direct") eq "direct" &&
    [8.106]
    [6.91]
    if (isLocalStore &&