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
hydra: 2017-11-21 -> 2018-08-07 #44841
Conversation
This causes collisions between the build outputs of `nix` when building in an environment with `nix1.perl-bindings` and `nix`: ``` collision between `/nix/store/aa4rrcj7dg2xj4rfkiclcmp745ibqng0-nix-2.0.4/lib/libnixstore.so' and `/nix/store/sp0sdi4bll80h58big1iy8kkh3qqxpw2-nix-1.11.16/lib/libnixstore.so' builder for '/nix/store/wgbccin107lhm8cv9imnnvkx1j2pgibc-hydra-perl-deps.drv' failed with exit code 25 ```
I played around with it locally, but I'll test the change with my own Hydra tomorrow, would be cool to get some feedback though:) |
Success on aarch64-linux (full log) Attempted: nix1 The following builds were skipped because they don't evaluate on aarch64-linux: hydra Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: hydra, nix1 Partial log (click to expand)
|
nativeBuildInputs = [ autoreconfHook ]; | ||
|
||
patches = lib.optionals (!isGreaterNix20) [ | ||
(fetchpatch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to inline a short description of this patch here.
@GrahamcOfBorg test hydra |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.hydra Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: tests.hydra Partial log (click to expand)
|
I'll look into the test and fix the review comments... |
regarding the test: it seems as the build of the Hydra derivation fails when evaluating the test expression (not sure why though), but it works fine, when running |
@srhb I fixed your comment and the test, would you mind having another look? let's see if I can trigger VM tests on my own (I'm a known user at least) :D |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.hydra Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.hydra Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: nix1 The following builds were skipped because they don't evaluate on aarch64-linux: hydra Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: hydra, nix1 Partial log (click to expand)
|
I approve, with one comment and the desire for one other reviewer, since it's Hydra and Hydra is scary. :P Why does the test need these extra systemPackages jq and bash? Shouldn't the module be taking care of that anyway? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your fixes!
So, just some minor comments.
@@ -7,9 +7,8 @@ let | |||
{ trivial = builtins.derivation { | |||
name = "trivial"; | |||
system = "x86_64-linux"; | |||
PATH = coreutils; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The with import <nix/config.nix>;
line is then useless. Could you also remove it?
PATH = coreutils; | ||
builder = shell; | ||
args = ["-c" "touch $out; exit 0"]; | ||
builder = "/bin/sh"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding what you said in the commit message, I think /bin/sh
comes from the busybox package which is bind mounted at the build environment creation (and not from the VM /bin/sh
).
nixos/tests/hydra/default.nix
Outdated
@@ -37,7 +36,7 @@ in { | |||
virtualisation.memorySize = 1024; | |||
time.timeZone = "UTC"; | |||
|
|||
environment.systemPackages = [ createTrivialProject pkgs.jq ]; | |||
environment.systemPackages = with pkgs; [ createTrivialProject jq bash ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bash
is useless
This bumps Hydra to the latest revision available. As Hydra doesn't have a release model (and therefore no tags) ATM, the derivation will pin against the actual git revision and the date of the commit in the derivation name. Additionally the following changes have been made: * Dropped `postUnpack` phase. It is useful when working with the Hydra source (and no dirty changes shall be used in `release.nix`, but is has no use in `nixpkgs`). * Added myself as maintainer to have more folks available in case of future breakage. * Implemented support for Nix 2.0 and `unstable` (currently 2.1): Since 1672bcd in NixOS/nix the evaluator differentiates between `settings` and `evalSettings`. Previously `restrictEval` in `hydra-eval-jobs.cc` has been set in `settings`, this doesn't work anymore in Nix 2.1 and is therefore incompatible to Nix 2.0 on an API level. To resolve this, the flag `isGreaterNix20` parses the version string of `pkgs.nix` and applies a patch if nix.version<=2.0. Furthermore the Hydra build with Nix 2.1 requires `boost` as build input which is not needed for Nix 2.0. To avoid unnecessary increase in the closure size this library will only used as build input for nix.version>2.0. * Fixed the NixOS test for `hydra`: disabled binary cache to allow sandbox builds (otherwise it would query `cache.nixos.org` during the Hydra build inside the test). Additionally the trivial.nix jobset required simplification (as done in NixOS/hydra, e.g. tests/api-test.nix) as bash is not available in the build sandbox as builder (even when adding pkgs.bash to systemPackages). The easiest workaround to confirm a the functionality of a jobset without importing nixpkgs is to use the default shell /bin/sh which is mounted from `pkgs.busybox` into the build env (NixOS#44841 (comment)) in the VM and a named pipe to create $out. Closes NixOS#44044
agreed, I use it on my own, but the more reviews, the safer I feel with this patch :D
@nlewo thanks for your feedback! |
Success on aarch64-linux (full log) Attempted: nix1 The following builds were skipped because they don't evaluate on aarch64-linux: hydra Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: hydra, nix1 Partial log (click to expand)
|
@GrahamcOfBorg test hydra |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.hydra Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.hydra Partial log (click to expand)
|
Thanks! |
Motivation for this change
postUnpack
hook.Fixes #44044
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)