forked from NixOS/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hydra-eval-jobs: don't break entire jobset if _some_ (not all) consti…
…tuents fail to evaluate So given a jobset like this: { pkgs = throw "This fails to evaluate very early"; pkgs2 = { /* this does evaluate and has packages inside */ }; release = stdenv.mkDerivation { name = "release"; _hydraAggregate = true; _hydraGlobConstituents = true; constituents = [ "pkgs.*" "pkgs2.*" ]; /* more code */ }; } you'd end up with an error like this and no jobs in the jobset evaluation: {UNKNOWN}: aggregate job ‘release’ failed with the error: pkgs.*: constituent glob pattern had no matches at /nix/store/vp3an70jzc5q9flyffrmwmj14rpsj8mq-hydra-perl-deps/lib/perl5/site_perl/5.38.2/Catalyst/Model/DBIC/Schema.pm line 526 This is because `hydra-eval-jobs` wrote a list of `constituents` from `pkgs2` into the JSON of the `release` job and later also added errors for the failed glob from `pkgs.*`. If that happens, `hydra-eval-jobset` just dies (i.e. if there's an aggregate job with eval errors). To work around that, we make sure to write no constituents at all if the aggregate job itself has errors.
- Loading branch information
Showing
3 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
with import ./config.nix; | ||
{ | ||
pkgs = throw "you shall not pass"; | ||
pkgs2.foo = mkDerivation { | ||
name = "foobar"; | ||
builder = builtins.toFile "build.sh" '' | ||
#!/bin/sh | ||
mkdir $out | ||
''; | ||
}; | ||
|
||
release = mkDerivation { | ||
name = "foobar"; | ||
builder = builtins.toFile "build.sh" '' | ||
#!/bin/sh | ||
mkdir $out | ||
''; | ||
_hydraAggregate = true; | ||
_hydraGlobConstituents = true; | ||
constituents = [ | ||
"pkgs.*" | ||
"pkgs2.*" | ||
]; | ||
}; | ||
} | ||
|