Repository navigation
PYTHON-6084 Allow python/setup action to pin the uv version - #137
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Passing an empty version value to astral-sh/setup-uv may override its default behavior and break installs when callers do not set uv-version.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the python/setup composite GitHub Action to allow callers to pin the installed uv version for reproducible builds, while keeping default behavior unchanged when not specified.
Changes:
- Added a new
uv-versioninput topython/setup. - Forwarded
uv-versiontoastral-sh/setup-uvvia itsversioninput.
File summaries
| File | Description |
|---|---|
| python/setup/action.yml | Adds a uv-version input and passes it through to the setup-uv step. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The action currently always passes an empty version value to setup-uv by default, which can change or break the installer’s default version-selection behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
python/setup/action.yml:53
versionis always passed toastral-sh/setup-uveven whenuv-versionis the default empty string; many actions treat an empty string as “set”, which can bypass the action’s normal default/auto-detect behavior (and may error). Consider omittingversionentirely unless the caller provided a non-emptyuv-version.
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: ${{ inputs.uv-version }}
enable-cache: ${{ inputs.enable-cache }}
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
PYTHON-6084
Summary
The
python/setupcomposite action callsastral-sh/setup-uvwithout selecting a uv version, so it auto-detects a version or installs the latest. In PYTHON-6084 we're adding arequirements/uv.txtfile to ensure consistent versions across CI and local. This change allows us to pass that version to the uv setup action.Changes
uv-versioninput topython/setup.astral-sh/setup-uv'sversioninput.Test Plan
Validated the action YAML parses.