Prefetch flake inputs with retries in CI - #2567
Open
MarcusSorealheis wants to merge 3 commits into
Open
Conversation
GitHub's tarball API intermittently returns 503s, which fails any job during flake input fetching before the build even starts. Prefetch all inputs with nix flake archive inside the same retry wrapper the attic setup already uses, so transient GitHub outages are absorbed instead of failing the run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FoVmjH7WSaK69bYy8xhVW7
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
palfrey
approved these changes
Jul 17, 2026
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.
Problem
CI jobs have been failing intermittently with HTTP 503s from GitHub's tarball API while Nix fetches flake inputs (e.g.
hercules-ci/flake-parts), before the actual build starts:Nix's own retry gives up within seconds, so a brief GitHub blip fails the whole job. The requests are already authenticated (
nix-installer-actionauto-configuresaccess-tokensfromGITHUB_TOKEN), so this is server-side flakiness, not rate limiting.Fix
Add a
nix flake archiveprefetch step to the sharedprepare-nixaction, wrapped in the samenick-fields/retryaction (5 attempts, 30s apart) the attic setup already uses. All flake inputs land in the store before anynix develop/nix buildstep runs, so transient 503s are ridden out instead of failing the run.The step deliberately fails (rather than skips) if GitHub is hard-down for the full retry window — a build job that can't fetch its inputs can't do anything meaningful, and skipping would report green without building.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FoVmjH7WSaK69bYy8xhVW7
This change is