Skip to content

Merge master into nix-next - #1844

Merged
Ericson2314 merged 16 commits into
nix-nextfrom
master
Aug 26, 2026
Merged

Merge master into nix-next#1844
Ericson2314 merged 16 commits into
nix-nextfrom
master

Conversation

@github-actions

Copy link
Copy Markdown

Automated PR to keep nix-next in sync with master.

Ericson2314 and others added 2 commits August 24, 2026 18:04
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
@Ericson2314
Ericson2314 added this pull request to the merge queue Aug 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 25, 2026
Conni2461 and others added 14 commits August 25, 2026 18:53
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.
@Ericson2314
Ericson2314 added this pull request to the merge queue Aug 26, 2026
Merged via the queue into nix-next with commit 2d5c3b8 Aug 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants