Repository navigation
1.0.0 is the stable release that follows the six 0.3.0 betas. These notes cover everything since 0.2.3, the previous stable release.
Upgrade notes
- The farm cache needs niks3 1.18.0 or newer, and 1.19.0 to keep the logs of failed builds. Upgrade niks3 first.
- Upgrade the scheduler before workers and clients. Workers and clients of 0.2.3 keep working against a 1.0.0 scheduler.
- Upgrade the balancer and the builders behind tunnels together (#386).
- A build fails when the cache rejects its outputs. It used to be reported as built (#258).
Builders in other networks
- A builder that the balancer cannot connect to can join a farm, for example from behind NAT or from another cluster. The builder opens tunnels to the balancer with
--tunnel host:portand receives its builds through them (#308, #317, #328). - The Helm chart lets workers of another cluster join through tunnels. Every balancer replica gets its own tunnel address (#318, #320, #326).
- Path queries and uploads for a system that only tunnelled builders build for reach one of those builders. List such systems in
tunnel.systems(lb.tunnel.systemsin the chart). Inputs were previously uploaded to a builder of another system and downloaded again from the cache (#369, #386). - The balancer waits briefly for a builder's tunnel to come back before it fails a request (#325).
Scheduling
- Builders are shared fairly. The next free slot goes to the user with the fewest running builds, and then to that user's
nix buildrun with the fewest (#336, #339). - A build survives a short break of its client's or its builder's connection to the scheduler. The scheduler holds the build for up to a minute (#342).
- The scheduler pauses a builder that keeps failing builds for reasons of its own (#296). It also stops sending a derivation to a builder that could not run it (#292), unless the builder only lacked an input (#255).
- A finished or given-back build can only end its own assignment. It could previously end a newer assignment of the same derivation (#283, #298, #300).
- The scheduler stays fast with deep queues and hundreds of clients (#338, #340, #341).
- The scheduler logs which builder each derivation went to and how the build ended (#370).
Cache and build logs
- The log of a failed build is uploaded to the cache, where
nix logfinds it (#348).nix log --store grpc://…works too (#257). - When two builders build the same path, both serve the copy that the cache published (#333).
- A build is reported as built when its client left during the upload (#335).
- A builder that is asked for a path it lacks reads the path from the cache and passes it on, and leaves its own store untouched. This fixes a build that hung forever on a machine that is both a farm client and a builder (#374, #376).
Access control
- Access rules can match SPIFFE IDs, also for clients that connect through the balancer.
--client-spiffe-bundlesverifies client certificates per trust domain (#343, #344, #352). - The balancer can verify workers by SPIFFE ID with the NixOS option
tls.upstream.spiffeId(#353). - A builder behind a tunnel can be identified by its SPIFFE ID, which SPIRE needs because it issues certificates without a common name (#366).
- OIDC allows one provider per issuer and audience (#273).
- Denied calls are counted by method and reason (#263).
Reliability
- The client retries more connection failures. These are a balancer that closes during the TLS handshake (#289), an unreachable worker (#304) and a NAR download whose session failed (#346).
- A worker stops accepting builds while its local nix-daemon is unresponsive (#285, #288), and it backs off while the balancer has no scheduler behind it (#361).
- An upload whose NAR is longer than declared is rejected (#290).
- A missing or empty token file fails immediately with the reason. The client used to retry for half a minute (#371).
- A client that sends neither a certificate nor a token gets a hint that says so (#372).
- A build with
--eval-store autono longer starts with "don't know how to build these paths" (#363).
NixOS
- The daemon can run as a flakelet. A node then updates the daemon from this flake without a rebuild of its system, see docs/flakelet.md (#349).
- A builder deletes Nix's build logs after
buildLogRetention, 30 days by default (#267, #271). --extra-system/extraSystemsadvertises systems that the local nix-daemon hands to other builders (#259).--lookup-threads/lookupThreadssets how many cache lookups the scheduler runs at once (#272).
Helm chart
- Worker pods can take their identity from a SPIRE agent on their node (#357).
- A worker's store can be a volume of its own (
store.storageClass,store.size) or a directory on the node (store.hostPath). With either, a full store fails the build and the pod keeps running (#356, #379). priorityClassNamefor workers, scheduler and balancer (#384).niks3.publicKeysFromtakes the cache's public keys from a Secret or ConfigMap (#385).extraVolumesandextraVolumeMountsfor workers (#251).- The dashboard counts builders as the scheduler sees them, so builders behind tunnels appear under their own system (#368).
Dependencies
Thanks to @ConnorBaker (#252, #253, #254, #255, #256, #257, #337, #345, #346), @zimbatm (SPIFFE access rules, SPIRE identities and the store volume), @GaetanLepage (#251, #379, #384), @Kranzes (#267) and @arianvp for his first contribution (#385).
Full Changelog: v0.2.3...v1.0.0