From e4fe4feb64787e80adf3a88984d309b91ff50554 Mon Sep 17 00:00:00 2001 From: Marcus Date: Fri, 17 Jul 2026 01:31:33 +0100 Subject: [PATCH] Prefetch flake inputs with retries in CI 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 Claude-Session: https://claude.ai/code/session_01FoVmjH7WSaK69bYy8xhVW7 --- .github/actions/prepare-nix/action.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/prepare-nix/action.yaml b/.github/actions/prepare-nix/action.yaml index ef076e416..e3d772cf5 100644 --- a/.github/actions/prepare-nix/action.yaml +++ b/.github/actions/prepare-nix/action.yaml @@ -20,6 +20,16 @@ runs: log-lines = 100 # Necessary in CI to get enough failure context keep-outputs = true # Don't delete non-root outputs, because might be needed for other builds + - name: Prefetch flake inputs + uses: >- # v4 + nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 + with: + timeout_minutes: 10 + max_attempts: 5 + retry_wait_seconds: 30 # GitHub tarball 503s are usually brief; ride them out + command: nix flake archive --json > /dev/null + shell: bash + - name: Setup attic cache uses: >- # v4 nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60