Skip to content

ci: prune every uv cache before it is saved - #27

Merged
mahdi-shafiei merged 1 commit into
mainfrom
ci/prune-uv-cache
Sep 30, 2026
Merged

mahdi-shafiei merged 1 commit into
mainfrom
ci/prune-uv-cache

Conversation

@mahdi-shafiei

Copy link
Copy Markdown
Collaborator

Summary

setup-uv v9 and later default prune-cache to false, so a saved uv cache keeps every wheel uv downloaded. In datarax the unpruned caches reached 3.9 GB each and evicted the dataset cache: run 36748306376 logged prune-cache: true / "Pruning cache...", and run 36760783548, after setup-uv v10.2.0, logged prune-cache: false. This mirrors avitai/datarax#49.

  • Sets prune-cache: true on the one setup-uv step, in the shared setup-diffbio action.
  • Adds test_every_uv_cache_is_pruned_before_it_is_saved to tests/test_ci_concurrency.py: every setup-uv step in .github/workflows/*.yml and .github/actions/*/action.yml must set it, and the test fails if it finds no setup-uv step at all.

Verification

  • The contract test failed before the workflow change and passes after it.
  • The YAML of every edited file parses, and the count of added prune-cache: true lines equals the count of astral-sh/setup-uv@ steps.
  • pre-commit run --all-files passes.

setup-uv v9 and later default prune-cache to false, so a saved uv cache
keeps every wheel uv downloaded. In datarax the unpruned caches reached
3.9 GB each and evicted the dataset cache (avitai/datarax#49).

Set prune-cache: true on the one setup-uv step, in the shared
setup-diffbio action.

A contract test now fails when any setup-uv step in a workflow or a
composite action leaves prune-cache out.
@mahdi-shafiei
mahdi-shafiei merged commit 7da1432 into main Sep 30, 2026
12 checks passed
@mahdi-shafiei
mahdi-shafiei deleted the ci/prune-uv-cache branch September 30, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant