build: bump uv to 0.12 and enable uv cache for staging tests - #1739
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
Included review availability: 0 reviews are currently available. Based on recent review activity, included reviews refill at 4 per hour. 📝 WalkthroughWalkthroughThe PR updates the project to uv 0.12.x, updates the pre-commit hook and Docker builder image, and enables uv caching in the staging test workflow. Changesuv Tooling Update
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This PR updates the uv toolchain and enables dependency caching for staging tests without any identified merge-blocking risk; it is merge-ready after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
uv 0.12 is the current release line; 0.11 is a release behind and the required-version pin blocked contributors who already run 0.12. Verified with uv 0.12.5: `uv lock --check` resolves the existing lock file unchanged, and `uv sync --locked` installs. None of the 0.12 breaking changes apply here - all workspace packages build with hatchling, so the uv_build upper-bound note in the release notes is not relevant.
setup-uv defaults enable-cache to "auto", which only caches on GitHub-hosted runners. The staging tests run on the self-hosted infra1-runners-arc group, so every run re-downloaded the whole test dependency set. Setting enable-cache explicitly restores the cache there. All other uv jobs run on ubuntu-latest and are already covered by "auto"; build-release is left alone because "auto" skips tag pushes on purpose and a release build should resolve from a cold cache.
Follow-up to the required-version bump; the pre-merge unit tests failed with "Required uv version ~=0.12.0 does not match the running version 0.11.33". Two places pin uv outside [tool.uv]: - The test image copies the binary from ghcr.io/astral-sh/uv:0.11. Moved that tag to 0.12. - The tox dependency group bounds the uv PyPI package at ~=0.11.0, because `uv pip install --group` resolves fresh instead of reading uv.lock and the console script installs over the copied binary. The comment there says to keep the bound in sync with required-version, so it moves to ~=0.12.0. Verified locally: `make test-ci-py310` builds an image with uv 0.12.5 and tox-uv 1.35.2, and reports "521 passed, 2 skipped, 3 xfailed".
9faa56e to
37932f9
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1739 +/- ##
=======================================
Coverage 79.44% 79.44%
=======================================
Files 272 272
Lines 19012 19012
=======================================
Hits 15105 15105
Misses 3907 3907 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two related tooling changes.
Bump uv to 0.12
uv 0.12 is the current release line. Three places pin uv, and all three move together:
[tool.uv] required-version~=0.11.0~=0.12.0Dockerfileuv image tagghcr.io/astral-sh/uv:0.11:0.12toxdependency group,uvbound~=0.11.0~=0.12.0uv-pre-commithook rev0.11.00.12.5The
toxgroup bound matters becauseuv pip install --groupresolves fresh from the index and its console script installs over the binary copied into the test image. The comment inpyproject.tomlalready asks to keep that bound in sync withrequired-version.uv.lockchanges only theuvpackage: 0.11.x to 0.12.5. No other locked package moves.Verified locally:
make test-ci-py310builds an image with uv 0.12.5 and tox-uv 1.35.2, then reports521 passed, 2 skipped, 3 xfailed.Note for everyone: run
uv self updateafter you pull. uv 0.11.x refuses to run in this repo now.Enable the uv cache for staging tests
astral-sh/setup-uvdefaultsenable-cachetoauto, which only caches on GitHub-hosted runners. Staging tests run on the self-hostedinfra1-runners-arcgroup, so every run re-downloaded the whole test dependency set. The step now setsenable-cache: true.The other uv jobs run on
ubuntu-latest, andautoalready covers them.build-release.yamlstays untouched:autoskips tag pushes on purpose, and a release build should resolve from a cold cache.Context: actions/setup-python#818 was declined upstream, so
actions/setup-pythonwill not get nativecache: uv. Theactions/cacheworkaround from that thread is not needed here, becausesetup-uvalready does the same thing.