From d88b9eec81c6328fba8eeb8027faf988bbeca08c Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Sun, 27 Sep 2026 13:27:29 -0400 Subject: [PATCH] Stop caching the depot registries when a local registry is used A local registry is a git clone that `Pkg.Registry.update` advances by rebasing, and one that fails to rebase stays broken in the cache for every later run, so resolution quietly falls back to stale registry data and reports it as unsatisfiable compat bounds. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/CheckCompatBounds.yml | 7 +++++++ .github/workflows/Documentation.yml | 7 +++++++ .github/workflows/Registrator.yml | 7 +++++++ .github/workflows/Tests.yml | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/.github/workflows/CheckCompatBounds.yml b/.github/workflows/CheckCompatBounds.yml index f218272..cbdd26a 100644 --- a/.github/workflows/CheckCompatBounds.yml +++ b/.github/workflows/CheckCompatBounds.yml @@ -73,6 +73,13 @@ jobs: - uses: julia-actions/cache@v3 if: "${{ inputs.cache }}" with: + # A local registry lives in the depot as a git clone, unlike General's + # packed form, and `Pkg.Registry.update` advances it by rebasing onto + # `origin/main`. A clone that once fails to rebase stays broken, and the + # cache hands the same broken clone to every later run, so resolution + # silently falls back to stale registry data and reports the result as + # unsatisfiable compat bounds. Re-clone it instead of restoring it. + cache-registries: "${{ inputs.localregistry == '' }}" token: "${{ secrets.GITHUB_TOKEN }}" # See the comment in `Tests.yml`: don't cache a failed job's # half-installed depot, which would otherwise poison the cache. diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 5b51e85..b614519 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -97,6 +97,13 @@ jobs: - uses: julia-actions/cache@v3 if: "${{ inputs.cache }}" with: + # A local registry lives in the depot as a git clone, unlike General's + # packed form, and `Pkg.Registry.update` advances it by rebasing onto + # `origin/main`. A clone that once fails to rebase stays broken, and the + # cache hands the same broken clone to every later run, so resolution + # silently falls back to stale registry data and reports the result as + # unsatisfiable compat bounds. Re-clone it instead of restoring it. + cache-registries: "${{ inputs.localregistry == '' }}" token: "${{ secrets.GITHUB_TOKEN }}" # See the comment in `Tests.yml`: don't cache a failed job's # half-installed depot, which would otherwise poison the cache. diff --git a/.github/workflows/Registrator.yml b/.github/workflows/Registrator.yml index 6db0f9a..9f87a97 100644 --- a/.github/workflows/Registrator.yml +++ b/.github/workflows/Registrator.yml @@ -75,6 +75,13 @@ jobs: - uses: julia-actions/cache@v3 with: + # A local registry lives in the depot as a git clone, unlike General's + # packed form, and `Pkg.Registry.update` advances it by rebasing onto + # `origin/main`. A clone that once fails to rebase stays broken, and the + # cache hands the same broken clone to every later run, so resolution + # silently falls back to stale registry data and reports the result as + # unsatisfiable compat bounds. Re-clone it instead of restoring it. + cache-registries: "${{ inputs.localregistry == '' }}" delete-old-caches: false # See the comment in `Tests.yml`: don't cache a failed job's # half-installed depot, which would otherwise poison the cache. diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 8ac90ba..debb3c5 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -179,6 +179,13 @@ jobs: - uses: julia-actions/cache@v3 if: "${{ steps.classify.outputs.triggers == 'true' && inputs.cache }}" with: + # A local registry lives in the depot as a git clone, unlike General's + # packed form, and `Pkg.Registry.update` advances it by rebasing onto + # `origin/main`. A clone that once fails to rebase stays broken, and the + # cache hands the same broken clone to every later run, so resolution + # silently falls back to stale registry data and reports the result as + # unsatisfiable compat bounds. Re-clone it instead of restoring it. + cache-registries: "${{ inputs.localregistry == '' }}" token: "${{ secrets.GITHUB_TOKEN }}" # Restore the pre-v3 behavior: don't save a cache from a failed # job. v3 caches on failure by default, which poisons the cache