Skip to content

Commit deed30c

Browse files
raballewclaude
andcommitted
fix(test): isolate uv cache per package to prevent parallel race
Parallel make test targets share a single UV cache directory, causing rename collisions on macOS (os error 66) when multiple uv processes write simultaneously. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b5d2e72 commit deed30c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

python/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,7 @@ cython_debug/
169169

170170
# Ruff cache
171171
.ruff_cache/
172+
173+
# Per-package uv cache (parallel test isolation)
174+
.uv-cache/
172175
mitmproxy-ca-cert.pem

python/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ docs-linkcheck: docs-generate-crds docs-generate-grpc
8181
uv run --isolated --all-packages --group docs $(MAKE) -C docs linkcheck
8282

8383
pkg-test-%: packages/%
84-
uv run --isolated --directory $< pytest || [ $$? -eq 5 ]
84+
UV_CACHE_DIR="$(CURDIR)/.uv-cache/$*" uv run --isolated --directory $< pytest || [ $$? -eq 5 ]
8585

8686
pkg-ty-%: packages/%
8787
uv run --isolated --directory $< ty check .
@@ -120,6 +120,7 @@ clean-test:
120120
-rm -f .coverage
121121
-rm -f coverage.xml
122122
-rm -rf htmlcov
123+
-rm -rf .uv-cache
123124

124125
clean-docs:
125126
uv run --isolated --all-packages --group docs $(MAKE) -C docs clean

0 commit comments

Comments
 (0)