PYTHON-6091 Pin a consistent uv binary version in CI and locally - #3053
PYTHON-6091 Pin a consistent uv binary version in CI and locally#3053blink1073 wants to merge 11 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Windows self-updates and PATH handling can leave setup failing or the pinned tools unavailable.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Pins one uv version across local development, GitHub Actions, and Evergreen.
Changes:
- Adds the central
uvversion pin and documentation. - Installs pinned tooling into dedicated binary directories.
- Updates CI and spawn-host PATH configuration.
File summaries
| File | Description |
|---|---|
pyproject.toml |
Defines the required uv version. |
CONTRIBUTING.md |
Documents version management and installation. |
.evergreen/scripts/setup-system.sh |
Configures non-CI shell PATH persistence. |
.evergreen/scripts/setup-dev-env.sh |
Reorders dependency and Python setup. |
.evergreen/scripts/install-dependencies.sh |
Discovers and installs pinned tooling. |
.evergreen/scripts/configure-env.sh |
Establishes task-local binary paths. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…id Windows uv self-overwrite
There was a problem hiding this comment.
🟡 Changes recommended
Version enforcement can block bootstrap installation, and the CI fallback directory is shared rather than task-local.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
Previously missed (1) — in code that hasn't changed since the last review.
.evergreen/scripts/configure-env.sh:26
- The
/tmp/pymongo-binfallback is host-global, not task-local as documented. Concurrent tasks or later tasks under another user can race on, overwrite, or be unable to update the same executables; use the checkout's existing task-local.localdirectory instead.
.evergreen/scripts/install-dependencies.sh:84
- An unpinned
uvfound on the toolchain orPATHis invoked from the project root here, so the newly addedrequired-versioncheck rejects it before it can install that required version. Bootstrap with project config disabled for this command.
uv tool install -q --force --from "uv${_uv_pin}" uv
.evergreen/scripts/install-dependencies.sh:102
- After an external bootstrap
uvinstalls the pinned binary,PATHstill resolvesuvto that external (potentially mismatched) version. Ifjustis absent, this command therefore fails the project'srequired-versioncheck; invoke the newly installed pinned binary instead.
uv tool install rust-just
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
…prepend bin dir
There was a problem hiding this comment.
🟡 Changes recommended
Shared CI paths and stale spawn-host environment files can cause races or make installed tools unavailable.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The revised bootstrap does not provision a pinned uvx executable as intended.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.evergreen/scripts/install-dependencies.sh:84
- The new bootstrap no longer provisions
uvx. The pinned PyPIuvpackage builds only theuvexecutable, while the removed toolchain bootstrap explicitly linked bothuvanduvx; therefore a fresh toolchain-based setup leaves nouvx, and the astral fallback can leave an unpinneduvxbeside the pinneduv. This also conflicts with the PR's stated intent to discover/installuv/uvx/just. Please create a platform-appropriateuvxalias/copy from the pinned binary after this install (including when the existing targetuvalready matches).
- Files reviewed: 6/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PYTHON-6091
Changes in this PR
Enforces a consistent version of uv in Evergreen CI, GitHub Actions, and local development.
[tool.uv] required-versioninpyproject.toml, enforced locally and read byastral-sh/setup-uv..evergreen/scripts/install-dependencies.shdiscovers uv from the toolchain (falling back to PATH, then astral download), installs the exact pinned version withuv tool install, and ensuresjustis present.Test Plan
Tested on a spawn host and on a variety of hosts with patch build.
Checklist
Checklist for Author
Checklist for Reviewer