ci(nix): harden Update Nix hashes against cache.nixos.org HTTP/2 flakes#209
Merged
Conversation
The Update Nix hashes run kept dying in nix-prefetch-github when a NAR
download from cache.nixos.org corrupted over HTTP/2 ("Stream error in the
HTTP/2 framing layer" -> zstd corruption), and nix gave up because it
could not fall back to building from source. Disable HTTP/2 via NIX_CONFIG
to avoid the framing bug, bump download retries, and pass --fallback to
every nix run/build so an unusable substitute builds from source instead
of failing the run.
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.
The Update Nix hashes workflow (added in #208) failed twice on the same transient cache error —
nix-prefetch-githubdied when a NAR download fromcache.nixos.orgcorrupted over HTTP/2:The same path (
boost-1.89.0-dev) corrupts on every retry, so re-running doesn't help.Fix
NIX_CONFIG: http2 = falseat the job level — avoids the HTTP/2 framing bug that corrupts the stream in the first place.download-attempts = 5/connect-timeout = 20— ride out transient drops.--fallbackon everynix run/nix build— if a substitute is still unusable, build it from source instead of failing the whole run (exactly what the error message recommends).No change to the hash logic. Merge this, then re-run Actions → Update Nix hashes →
2.4.0.