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
buildLayeredImage: Allow empty store, no paths to add #80921
buildLayeredImage: Allow empty store, no paths to add #80921
Conversation
It would be nice to add a test case (building and loading such image) because I'm pretty sure nobody will test this behavior in case of refactoring ;) |
I agree it would be nice to have a test. I did look for existing tests to add to, but I didn't find any. Or are these supposed to be used as tests? https://github.com/NixOS/nixpkgs/blob/f9388a76344479c3a1855f45a69fc3676905a4e7/pkgs/build-support/docker/examples.nix |
@roberth that's not ideally at all, but currently, we add an example image in |
0115dbc
to
9cf1b35
Compare
9cf1b35
to
8b2d61a
Compare
@nlewo I've added a test case. |
@roberth Arf, we just merged to Python migration of the test:/ Could you rebase your test? |
This is useful when buildLayeredImage is called in a generic way that should allow simple (base) images to be built, which may not reference any store paths.
8b2d61a
to
6dab1b5
Compare
@nlewo rebased. |
This also solves hercules-ci/arion#91 according to manveru. |
@GrahamcOfBorg test docker-tools |
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 the test!
I'm just waiting for the bot feedback;)
@GrahamcOfBorg test docker-tools I'm surprised by the timeout. Output seems to have stopped around here https://github.com/NixOS/nixpkgs/pull/80921/files#diff-1635c3330be60719346294be6c07f88fR153 The preceding test produced output and it should return immediately. |
@GrahamcOfBorg test docker-tools |
Seems to pass on rerun. |
Backported to 20.03 |
This is useful when buildLayeredImage is called in a generic way
that should allow simple (base) images to be built, which may not
reference any store paths.
For example arion uses it to build a very bare base image for use with the host's Nix store.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)