From 635f613b6c8b106a42aaae9b317d26faba47828f Mon Sep 17 00:00:00 2001 From: cgeng Date: Thu, 6 Aug 2026 13:41:56 +0200 Subject: [PATCH 1/2] Let only Test save the shared uv cache astral-sh/setup-uv derives its cache key from architecture, runner image, Python version and a hash of the dependency files, so every job that runs the same OS and the same Python version derives the same key. When such jobs run from one push, they all try to reserve that key at save time; the first to finish wins and the rest log Failed to save: Unable to reserve cache with key setup-uv-2-..., another job may be creating this cache. The warning is save-time only and harmless -- the losing job would have written identical content -- but it is log noise. Giving each workflow its own cache via cache-suffix was considered and rejected in audeering/audeer#207: it multiplies near-identical caches for no benefit. Instead keep the one shared key and make exactly one writer. Documentation, Linter and Publish set save-cache: false; Test keeps the default and is the sole writer. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/doc.yml | 2 ++ .github/workflows/linter.yml | 2 ++ .github/workflows/publish.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 3046e3f5..2d7e257e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -31,6 +31,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Ubuntu - install libsndfile uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 25e6c3cd..dee94887 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -21,6 +21,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false - name: Install pre-commit hooks run: uvx pre-commit install --install-hooks diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b651dd58..5aacf913 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,6 +27,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: false # PyPI package - name: Build Python package From 8d3b87dc9126264069f2ec71db5ad8761a05719c Mon Sep 17 00:00:00 2001 From: cgeng Date: Thu, 6 Aug 2026 13:51:41 +0200 Subject: [PATCH 2/2] Stop the two ubuntu 3.10 Test legs racing The Test matrix declares ubuntu-latest + Python 3.10 twice, once plain and once with pandas==2.1.4. Same OS and same Python means the same setup-uv cache key, so those two legs race with each other and the previous commit alone does not silence them. Measured on this pull request with a cold key (run 31098374254, attempt 2): both legs missed setup-uv-2-x86_64-unknown-linux-gnu-ubuntu-24.04-3.10.20-ed955f29..., the pandas leg saved it at 11:50:33 and the plain leg reported at 11:50:37 Failed to save: Unable to reserve cache with key setup-uv-2-...-3.10.20-..., another job may be creating this cache. That was the only warning left, and it came from this pair alone. Making the variant leg skip the save leaves exactly one writer in Test: matrix.pandas is unset for every other leg, so the expression is true there and false for the pandas leg. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46b7a975..8521ca87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + save-cache: ${{ !matrix.pandas }} - name: Ubuntu - install libsndfile uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0