[Nix#2236] Treat remote builders as substituters? #141
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
Feature/S3
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#141
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?
Upstream-Issue: NixOS/nix#2236
I can see some potential advantages to treating remote builders as substituters before trying to build any derivations — this would allow the build plan to be executed more efficiently in some cases, with less copying around of paths and potentially less overall building as well.
Consider:
b.drv, a derivation which produces the output path/nix/store/bc.drv, a derivation which produces the output path/nix/store/ca.drv, which produces the output/nix/store/aand depends on the outputs ofb.drvandc.drv./nix/store/ahas a reference to/nix/store/bbut none to/nix/store/c.alice, havingbobandcharlotteconfigured as remote builders, doesn't have any of the output paths available, nor can it build any of the drvs (incompatible system or something)bobdoesn't have any of the paths available, but can build themcharlottehas all the paths built.Now running
nix build /nix/store/a.drvonalicecan result in something like the following:alicemakesbobbuildb.drvand copies the output path overalicemakescharlottebuildc.drv(no-op) and copies the output path overalicecopies/nix/store/ctoboband makesbobbuilda.drv, then copies the output path overEnd result being that all three derivation's output paths have been copied to all three systems, and
b.drvanda.drvhave been unnecessarily rebuilt.If
alicehasbobandcharlotteconfigured as substituters additionally,alicewill first query them for/nix/store/a, and upon determining thatcharlottealready has the path, will only copy/nix/store/aand/nix/store/bto itself, resulting in no unnecessary building and no superfluous space usage.Are there any drawbacks to universally treating builders as (absolutely trusted, i.e. no sigs required) substituters as well?