From bfabecc22454ec8f93adf0756daf1c5cf8798bfa Mon Sep 17 00:00:00 2001 From: cgeng Date: Thu, 6 Aug 2026 13:40:09 +0200 Subject: [PATCH] Let only Test save the shared uv cache astral-sh/setup-uv derives its cache key from the runner architecture, the runner image, the Python version and a hash of the dependency files. Documentation, Linter and the ubuntu-latest/3.10 leg of Test therefore all derive the same key, and when one push triggers them together they race to reserve it at save time. Only the first to finish wins; the losers log Failed to save: Unable to reserve cache with key setup-uv-2-..., another job may be creating this cache. The race is save-time only and harmless, since every loser would have written identical content, but it is noise in an otherwise green log. Giving each workflow its own cache-suffix would remove the collision by storing several copies of the same cache, which was rejected as wasteful in audeering/audeer#207. Keep the single shared key instead and make exactly one workflow the writer: Documentation, Linter and Publish set save-cache: false, so they still restore the cache but never save it, and Test remains the sole saver. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/doc.yml | 2 ++ .github/workflows/linter.yml | 2 ++ .github/workflows/publish.yml | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 91990cc..d9118c7 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -25,6 +25,8 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Install dependencies run: uv sync diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b75476d..05bf670 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -21,6 +21,8 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Install pre-commit hooks run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7a016b7..9aca02e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,6 +36,8 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Install build dependencies run: uv sync @@ -85,6 +87,8 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Install dependencies run: uv sync