Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to verify build determinism
Passing "--option build-repeat <N>" will cause every build to be repeated N times. If the build output differs between any round, the build is rejected, and the output paths are not registered as valid. This is primarily useful to verify build determinism. (We already had a --check option to repeat a previously succeeded build. However, with --check, non-deterministic builds are registered in the DB. Preventing that is useful for Hydra to ensure that non-deterministic builds don't end up getting published at all.)
- Loading branch information
Showing
3 changed files
with
76 additions
and
12 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
8fdd156
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.
Nice! Have you seen NixOS/nixpkgs#9731? My original idea was to have hydra run (at least some) packages
meta.reproducible
with--check
, but this thing sounds better.Was also thinking that it might be nice to try to maximize variation in builders across a fleet in Hydra. So if I have
build-repeat 3
and a fleet of different build machines, hydra would run the same build on many of them. That might take more work than it's worth, though.8fdd156
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.
Yeah, I thought about having Hydra do a build in parallel on different machines, but that also multiplies the amount of I/O / network traffic, which is currently a limiting factor. So it's cheaper to run a build multiple times on the same machine.
8fdd156
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.
@edolstra Maybe with you plan for the build machines to use cache.nixos.org directly (as described in mailing list), that would that be less of a problem? Would be nice to try on different machines long term.
8fdd156
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.
From what I had tried, finding loads of non-deterministic packages is rather easy, especially if you disable chrooting, but fixing much of what you find is very time-consuming.
8fdd156
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.
FYI http://www.gnu.org/software/guix/manual/html_node/Invoking-guix-challenge.html
8fdd156
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.
8fdd156
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.
So do I. Such things always make me sad, and I never really understood why (the split).