Merge master into nix-next - #1844
Merged
Merged
Conversation
Note that this changes a URL, which is a breaking change, but since
- content-addressed derivations are experimental and not yet enabled at
`hydra.nixos.org`
- the route it changes never worked
there is nothing here worth preserving compatibility with.
It bears reiterating that this commit only changes code which is *dead*
with respect to `hydra.nixos.org`.
Implementation details:
Nix 2.35 moved build traces about: a `DrvOutput` became a derivation's
store path and an output name rather than a hash, the cache directory
went from `realisations/` to
`build-trace-v2/<drvBaseName>/<outputName>.doi`, and the file there
stopped carrying its own key, holding just the value.
What we were doing had simply not caught up. Uploading to the binary
cache still wrote under `realisations/`, and wrote a whole
`Realisation`, `{"key": ..., "value": ...}`, keeping to the old
convention of a file that names itself. Both were right once; neither is
something a current client looks for or can parse.
The queue runner upload code path presumably did work, just was out of
date for the latest clients (that enabled this experimental feature).
The on-demand code path was in worse shape -- totally broken:
1. It matched the old `sha256:<hex>!<output>.doi` key, which the binding
it called could no longer parse, so it could not have answered even
the Nix we build against.
2. It asked the local Nix store, which we would rather get rid of
*altogether*, and which has no build traces to give in any case,
since the queue runner only ever writes them to S3.
For the on-demand code path, Hydra should in fact bypass both these
issues by always using its database instead. `BuildStepOutputs` already
records what a build trace is, on every build whatever the backend, so
there was nothing to migrate and nothing new to teach the queue runner.
That leaves one of our Nix bindings --- `queryRawRealisation` ---
unused, so we can get rid of it.
Neither direction was tested, which is how both went unnoticed: the one
test that looks was asserting the stale directory exists. Now at least
the on-demand way is tested.
The on-demand build trace entry is unsigned, however. See the new TODO
on `BuildStepOutputs`: it is there because we need to track more
information in the database if we are to fix this properly. What we
upload is signed already, so that path does not have to wait.
Finally, stop saying "realisation", which is a term we are in the
process of getting rid of. A build trace is the whole map; one record in
it is a build trace entry, which is what most of this deals in. The
harmonia type keeps its name, being someone else's.
Assisted-by: Claude Code (Opus 5)
Serve and upload build traces the way Nix asks for them
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 25, 2026
fix: migrate to 64bit timestamps
With ORDER BY s.build DESC LIMIT 1 the planner walked buildsteps_pkey backwards filtering on drvPath. For a never-built drv that is a full scan of BuildSteps (>10 min on hydra.nixos.org), stalling the dispatcher. `+ 0` makes it use IndexBuildStepsOnDrvPath instead (0.4 ms).
db: force drvPath index in resolve_drv_output_chains
Share one dependency build between hydra-queue-runner and hydra-builder instead of recompiling all dependencies per crate on every source change. crane also vendors git dependencies from Cargo.lock, so the manual harmonia outputHashes go away.
cachix needs a secret that pull requests from forks do not get, so they rebuild everything. hestia uses the repository's actions cache instead. Build the cargo deps as a separate step so they get cached even when the tests fail.
Build rust crates with crane, cache CI with hestia
ci/cache-gc: fix invalid YAML in run step
This lets us build all Rust components on macOS.
Fix Hydra build on macOS
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.
Automated PR to keep
nix-nextin sync withmaster.