From ace876dfed1217731b4bab09f34c6b1f7f3a8d50 Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Thu, 12 Nov 2026 10:47:22 -0600 Subject: [PATCH] ci(id): fall back to source build when Magic Nix Cache substituter throttles (#774) --- .github/ci-policy.md | 2 ++ .github/workflows/id-bench.yml | 4 ++++ .github/workflows/id-check.yml | 12 ++++++++++++ .github/workflows/id-e2e-nightly.yml | 4 ++++ 4 files changed, 22 insertions(+) diff --git a/.github/ci-policy.md b/.github/ci-policy.md index 47d4ebbb19..f40723bf27 100644 --- a/.github/ci-policy.md +++ b/.github/ci-policy.md @@ -348,4 +348,6 @@ stays schedule-only for this reason. Magic Nix Cache is a performance optimization, not a CI verdict. The eight `DeterminateSystems/magic-nix-cache-action` steps in `id-check.yml`, `id-bench.yml`, `id-e2e-nightly.yml`, `mcpx-docs.yml`, `mcpx-nixbuild.yml`, and `mcpx-realsoftware-nightly.yml` are best-effort (`continue-on-error: true`): a cache service throttle (including HTTP 418) or 5xx must fall through to a cold build, while the subsequent build/check remains authoritative. +Recurrence (2026-11-12, #774): making the cache *action step* best-effort did not cover the substituter fetch inside the build itself — on main, three `id` workflow runs failed across essentially all `basic: nix flake check` jobs when `nix build` fetched narinfo from the local cache proxy (http://127.0.0.1:37515) and the proxy answered HTTP 418 (GitHub API ResourceExhausted). The id workflows therefore also set `fallback = true` in the nix-installer `extra-conf` of every job that uses Magic Nix Cache (`id-check.yml`: check_each, no-world, full-flake-check; `id-e2e-nightly.yml`: check; `id-bench.yml`: bench): a substituter that errors degrades to a direct/source build instead of failing the check, while a healthy cache is still used first. The mcpx workflows keep the step-level mitigation only; extend the same setting there if the substituter path recurs for them. + The required `nix flake check` in `nix-ci.yml` intentionally has no shared cache. The October 2026 #774 incidents on PRs #771 and #747 showed that cache-backend failures can masquerade as code failures. This change keeps the current Magic Nix Cache / GitHub Actions cache choice and does not migrate to Cachix or another backend; evaluate that separately. diff --git a/.github/workflows/id-bench.yml b/.github/workflows/id-bench.yml index 38a7271c7f..af720db5cb 100644 --- a/.github/workflows/id-bench.yml +++ b/.github/workflows/id-bench.yml @@ -52,6 +52,10 @@ jobs: with: extra-conf: | accept-flake-config = true + # #774 recurrence (2026-11-12): when the Magic Nix Cache proxy + # throttles (HTTP 418), fall back to building from source + # instead of hard-failing the check on the narinfo fetch. + fallback = true # Same store cache as the PR gate, so the bench build starts warm # (#288). diff --git a/.github/workflows/id-check.yml b/.github/workflows/id-check.yml index 52a6a0957e..6ff76d6af8 100644 --- a/.github/workflows/id-check.yml +++ b/.github/workflows/id-check.yml @@ -163,6 +163,10 @@ jobs: with: extra-conf: | accept-flake-config = true + # #774 recurrence (2026-11-12): when the Magic Nix Cache proxy + # throttles (HTTP 418), fall back to building from source + # instead of hard-failing the check on the narinfo fetch. + fallback = true # Cache the nix store on GitHub's cache so main runs do not rebuild # unchanged derivations from a cold store every run (#288). @@ -242,6 +246,10 @@ jobs: with: extra-conf: | accept-flake-config = true + # #774 recurrence (2026-11-12): when the Magic Nix Cache proxy + # throttles (HTTP 418), fall back to building from source + # instead of hard-failing the check on the narinfo fetch. + fallback = true - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 continue-on-error: true with: @@ -292,6 +300,10 @@ jobs: with: extra-conf: | accept-flake-config = true + # #774 recurrence (2026-11-12): when the Magic Nix Cache proxy + # throttles (HTTP 418), fall back to building from source + # instead of hard-failing the check on the narinfo fetch. + fallback = true - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 continue-on-error: true with: diff --git a/.github/workflows/id-e2e-nightly.yml b/.github/workflows/id-e2e-nightly.yml index afee985219..063286a9af 100644 --- a/.github/workflows/id-e2e-nightly.yml +++ b/.github/workflows/id-e2e-nightly.yml @@ -37,6 +37,10 @@ jobs: with: extra-conf: | accept-flake-config = true + # #774 recurrence (2026-11-12): when the Magic Nix Cache proxy + # throttles (HTTP 418), fall back to building from source + # instead of hard-failing the check on the narinfo fetch. + fallback = true # Same store cache as the PR gate, so the nightly run starts warm # and unchanged derivations are not rebuilt from cold (#288).