-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make --keep-going work with drv that don't have a system #12168
base: master
Are you sure you want to change the base?
Make --keep-going work with drv that don't have a system #12168
Conversation
3d26e2f
to
42567d4
Compare
42567d4
to
d534b27
Compare
The basic idea seems sound here :) |
Heh yeah, I'm trying to diagnose why the tests fail. It seems like this PR is cursed with the same problem as the original attempt. |
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 don't really see why the test fails, and I don't know whether my suggestion would fix it, although probably not because I think that's for preventing false successes.
@@ -36,6 +36,7 @@ struct BuildResult | |||
NotDeterministic, | |||
ResolvesToAlreadyValid, | |||
NoSubstituters, | |||
NoBuilders, |
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.
NoBuilders, | |
NoCompatibleBuilder, |
@@ -61,6 +61,7 @@ MakeError(InvalidPath, Error); | |||
MakeError(Unsupported, Error); | |||
MakeError(SubstituteGone, Error); | |||
MakeError(SubstituterDisabled, Error); | |||
MakeError(BadSystem, Error); |
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.
MakeError(BadSystem, Error); | |
MakeError(NoCompatibleBuilder, Error); |
# Hack to get the scheduler to do what we want: The `good` derivation can | ||
# only be built after `delay_good` (which takes a long time to build) while | ||
# the others don't have any dependency. | ||
# This means that if we build this with parallelism (`-j2`), then we can be | ||
# reasonably sure that the failing derivations will be scheduled _before_ the | ||
# `good` one (and so we can check that `--keep-going` works fine) |
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.
This could be synchronized by waiting for a file to appear in a mutable directory in extra-sandbox-paths
. The test would have to monitor the CLI's log before creating it.
(doing it in the failing
derivation would only decrease the length of the race condition, but not make it reliable)
Something along the lines of
nix build --extra-sandbox-paths "$TEST_ROOT/sync" 2>&1 \
| while read ln; do
echo "nix build: $ln"
if echo "$ln" | grepQuiet ...; then
touch "$TEST_ROOT/sync/failing-drv-failed"
fi
done
Motivation
Fixes #8321, this resurrects #8775 and changes things a little differently.
Context
This adds a new build result of
NoBuilders
which implies that the derivation cannot be build because there are no builders. While a new error failure calledBadSystem
is added to imply the system configuration is bad or incompatible. These have similar meaning but imply different things which could make sense for future PR's. Currently, only a bad system error occurs when there are no builders which matches a derivation.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.