Make build-related global settings into store settings #886
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#886
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
The initial trigger for this was configuring the forkos hydra: we want to use the same build machines in different configurations for big-parallel and other jobs. For example, we have the following lines in the hydra machines file:
With a dumb hack for hydra, this allows building big-parallel jobs with
cores
set to 60 while limiting other jobs to 20.Describe the solution you'd like
The dumb implementation in this special case aside, I think
cores
should in fact be a store setting to allow doing this in a more principled fashion -- both for hydra (once we finally make it use the store abstraction rather than its own special sauce) and for standalone Lix, via settings that allow specifying stores (--eval-store
,--store
and--builders
are the ones that come to mind for me).A number of other settings that control builds should, IMHO, also be moved from the global scope to become store-specific. Some examples (not exhaustive):
build-dir
-- could be used to ensure builds run on a specific filesystem if requiredsandbox
(and all settings beginning withsandbox-
)extra-platforms
pasta-path
pre-build-hook
post-build-hook
secret-key-files
Describe alternatives you've considered
Keep the status quo; the global settings affect all local stores used, and remote stores cannot be configured.
Anything that needs to do this could also split builds across multiple processes to avoid sharing the global settings. This would mean much more work on the part of consumers, especially ones that don't already take over scheduling (like hydra).
See also https://gerrit.lix.systems/c/lix/+/3492 which did this for build-dir but was abandoned in favour of a hotfix with less far-reaching implications