Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix declarative jobsets due to nix command being hidden #722

Merged
merged 3 commits into from Mar 4, 2020

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Mar 4, 2020

I briefly looked for a Nix-1 interface to do this, but readNixFile has always been implemented using nix cat-file.

Declarative jobsets were broken by the Nix update, causing
nix cat-file to break silently.

This commit restores declarative jobsets, based on top of a commit
making it easier to see what broke.
@grahamc grahamc changed the title Fix declarative jobsets Fix declarative jobsets due to nix command being hidden Mar 4, 2020
@grahamc
Copy link
Member Author

grahamc commented Mar 4, 2020

Previously, hydra-notify outputted:

sending notifications for build 6...
sending notifications for build 7...
error: experimental Nix feature 'nix-command' is disabled

Now,

error: experimental Nix feature 'nix-command' is disabled
ERROR: failed to readNixFile /nix/store/vwl90lm7gcvqicn8q9844n0bisa4w7b7-spec.json: command `nix cat-store --store auto /nix/store/vwl90lm7gcvqicn8q9844n0bisa4w7b7-spec.json' failed with exit status 256 (in an indeterminate location) at /home/grahamc/projects/github.com/NixOS/hydra/src/lib/Hydra/Helper/Nix.pm line 433.

while the success case is still working:

warning: ignoring the user-specified setting 'experimental-features', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'store', because it is a restricted setting and you are not a trusted user

@grahamc
Copy link
Member Author

grahamc commented Mar 4, 2020

Note that tests don't pass on this branch, but also they don't pass on master?

Specifically:

ok 11 - Build 'build1' from jobs/basic.nix should exit with code 0
ok 12 - Build 'build1' from jobs/basic.nix should have buildstatus 0
STDERR: evaluator: 'hydra-eval-jobs' '<jobs/build-output-as-input.nix>' '--gc-roots-dir' '/home/grahamc/projects/github.com/NixOS/hydra/tests/nix/var/nix/gcroots/per-user/grahamc/hydra-roots' '-j' '1' '-I' 'build1=/home/grahamc/projects/github.com/NixOS/hydra/tests/nix/store/mnikj20kijch7nvxshgk02k7misvjsrm-build1' '--arg' 'build1' '{ outPath = builtins.storePath /home/grahamc/projects/github.com/NixOS/hydra/tests/nix/store/mnikj20kijch7nvxshgk02k7misvjsrm-build1; inputType = "build"; outputName = "out"; drvPath = builtins.storePath /home/grahamc/projects/github.com/NixOS/hydra/tests/nix/store/xmnj5k4ncfs8j8a453zks51cfxhlq59x-build1.drv;}' '-I' 'jobs=/home/grahamc/projects/github.com/NixOS/hydra/tests/nix/store/8d8njhbr06rdn2l269nixx87a7rzdvyc-jobs' '--arg' 'jobs' '{ outPath = builtins.storePath /home/grahamc/projects/github.com/NixOS/hydra/tests/nix/store/8d8njhbr06rdn2l269nixx87a7rzdvyc-jobs; inputType = "path"; uri = "/home/grahamc/projects/github.com/NixOS/hydra/tests/jobs"; rev = "20200304043959";}'
  created cached eval 3
ok 13 - Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0
not ok 14 - Evaluating jobs/build-output-as-input.nix for second time after building build1 should result in 1 build in queue
#   Failed test 'Evaluating jobs/build-output-as-input.nix for second time after building build1 should result in 1 build in queue'
#   at ./evaluation-tests.pl line 46.

I tried bisecting, but hydra no longer builds on 027668f presumably because pkgs.nixUnstable updated.

@edolstra edolstra merged commit e6e4aa5 into NixOS:master Mar 4, 2020
@grahamc grahamc deleted the fix-declarative-jobsets branch March 4, 2020 11:52
@grahamc
Copy link
Member Author

grahamc commented Mar 4, 2020

Test failure was reported in #718 and is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants