Skip to content

Realisations use regular drv paths again#15322

Merged
Mic92 merged 2 commits intoNixOS:masterfrom
obsidiansystems:build-trace-rework
Mar 2, 2026
Merged

Realisations use regular drv paths again#15322
Mic92 merged 2 commits intoNixOS:masterfrom
obsidiansystems:build-trace-rework

Conversation

@amaanq
Copy link
Copy Markdown
Member

@amaanq amaanq commented Feb 23, 2026

Note

This is a redo of #12464 with a bug fix applied

Motivation

Fix #11897

As described in the issue, this makes for a simpler and much more intuitive notion of a realisation key. This is better for pedagogy, and interoperability between more tools.

Context

The way the issue was written was that we would switch to only having shallow realisations first, and then do this. But going to only shallow realisations is more complex change, and it turns out we weren't even testing for the benefits that derivation hashes (modulo FODs) provided in the deep realisation case, so I now just want to do this first.

Doing this gets the binary cache data structures in order, which will unblock the Hydra fixed-output-derivation tracking work. I don't want to delay that work while I figure out the changes needed for shallow-realisations only.

Revert "Use the hash modulo in the derivation outputs"

This reverts commit bab1cda.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority store Issues and pull requests concerning the Nix store labels Feb 23, 2026
@amaanq amaanq force-pushed the build-trace-rework branch from e5d0f93 to 73dc7fd Compare February 23, 2026 17:46
@amaanq amaanq changed the title Build trace rework Realisations use regular drv paths again Feb 23, 2026
@amaanq amaanq force-pushed the build-trace-rework branch from 73dc7fd to ccb423f Compare February 23, 2026 17:52
@Mic92 Mic92 enabled auto-merge February 24, 2026 11:18
This reverts commit 100e7cc.

Unlike the last version, this fixes `--print-out-paths` for old clients

When the client lacks `featureRealisationWithPath` (worker) or version <
2.8 (serve), the daemon was sending an empty `StringMap` for
`builtOutputs`, causing `--print-out-paths` to print nothing. This
commit constructs the old wire format instead, using a dummy `sha256:`
hash since the derivation hash no longer exists. Old clients only need
the output name and path from the JSON.
Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 tested this and it is not causing problems anymore

The previous commit changed CA derivation realisations to be keyed by
store path instead of hash modulo, affecting binary cache and wire
protocols. Users and tool authors need to understand the impact on
binary cache layout, protocol negotiation, and what migration looks
like.

This documents the key changes: the new build-trace-v2/ cache directory,
the split key/value JSON format, worker protocol feature negotiation,
serve protocol version bump, and the fact that non-CA users are
unaffected.
@Mic92 Mic92 added this pull request to the merge queue Mar 2, 2026
Merged via the queue into NixOS:master with commit 35be9ef Mar 2, 2026
15 checks passed
@amaanq amaanq deleted the build-trace-rework branch March 25, 2026 05:13
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realisations should go back to using regular drv paths

3 participants