Repository navigation
pkgs/fleet: split dependency compilation out of the glibc variant builds with crane (code#8392) - #8572
Merged
Conversation
…lds with crane (code#8392)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
pkgs/fleet's glibc variants (fleet,fleet-serve,fleet-connect) now compile their registry dependencies as their own derivation per variant (cranebuildDepsOnly→cargoArtifacts) instead of recompiling the whole dependency tree inside every variant build on every source change. The root flake gains acraneinput (pinned to rev 01bc1d40, the rev the lock graph already carried via rust-flake — the lock diff adds no new upstream source) andmake-fleetpassescraneLibin.Kept identical on purpose:
srcis still the pkgs/ fileset, cargo runs fromsource/fleet; crane vendors from the explicitcargoLock = ./Cargo.lockpath (the lockfile is not at the source root here).cargoExtraArgs(which carries-p fleethere and would narrow the run to the fleet crate's 27 tests), so the package build setscheckPhaseCargoCommand = "cargoWithProfile test --locked"to keep the workspace-wide run.FLEET_SOURCE_REV/ ORT env wiring.Exceptions (documented in the file header):
buildRustPackage: underpkgsStatic, crane's cargo environment applies crt-static to host build scripts too (alibcbuild script fails linking glibc's dynamic objects). The statics need crane's cross-toolchain treatment (build-platform toolchain + musl target + per-target CC for-syscrates) before they can split.fleet-brokersstays monolithic: rollback inventory that retires at the epic's close, and its build/test flag split (--binsto build, lib tests to check) does not map onto crane's singlecargoExtraArgswithout changing which tests run.craneLibkeep the monolith (fallback branch).Measured (laptop, through
~/tools/fleet-build-lock, 2026-11-11, base 1670d42)y22n338d…-fleet-deps+ package, 207s for bothpkgs/fleet/default.nixitself was edited, since the deps key is the cargo files only), 180s, green — the time is workspace crates + the workspace test suitefleet-connectbin/fleet is 926728 bytes (gate <= 2097152); alias symlinkfleet-connect -> fleetpresentfleet-serveHonest remainder: the deps layer is per variant feature set (full / serve / connect are different graphs, and musl would be a fourth) — the split removes the per-source-change recompile, not the per-variant one.
Flake note (pre-existing, not this change)
Tonight the laptop ran at load 6–30 and the workspace suite failed intermittently in BOTH build systems, a different timing-sensitive test each run:
atlas-searchcli_parity's qvec race (in the atlas PR),fleet-proxyconnect_udp EINTR, and four differentfleet-queueclient::tests::marker_search_*siblings — including in a pristine monolith build of this same base rev. Every failure passed on a later retry. Recorded on code#8392 as a follow-up: that test family races under load.darwin eval: the change is platform-neutral (craneLib is built per-system inside make-fleet); aarch64-darwin instantiation was not run from this x86_64-linux host.
Refs code#8392.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.