Split Locks: Use dedicated lock files for builds which will use build hooks for building#15856
Draft
MaxHearnden wants to merge 1 commit into
Draft
Split Locks: Use dedicated lock files for builds which will use build hooks for building#15856MaxHearnden wants to merge 1 commit into
MaxHearnden wants to merge 1 commit into
Conversation
ea05f38 to
9d91c10
Compare
9d9f10d to
e9e41f8
Compare
building This allows the build hook to use the local store. In order for the split locks to be used, derivations must either only use the build hook (avoid-local) or only be built locally (forceLocal/bmLocal).
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR adds new remote only locks and a new local only build mode selectable through a new parameter in the builder option which avoids the current build hook decline logic.
Context
Fixes #2029
Fixes #2589 (allows local to be a builder)
Fixes #10740 (the force local builder option allows for otherwise recursive setups)
The bmLocal build mode is like bmNormal except for the fact that it forces local builds so that the builder doesn't even attempt to hold the remote (build hook) lock.
Due to the lock split, build hooks will now need to hold the local lock when copying derivation outputs if avoid-local is set.
I had considered having the local mode be a worker option however I wasn't sure how to pass the option to the remote builder.
The option name
avoid-localcould be changed if there's a better suggestion, however I don't think that disabling local builds should be the default option, unless local becomes a default builder.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.