UN-3448 [FIX] Remove vestigial uv pip install line in uv-lock-automation workflow#1941
Conversation
…on workflow Modern uv requires uv pip install to run inside a virtual environment OR with the explicit --system flag. The workflow currently has neither, so it errors out: error: No virtual environment found for Python 3.12.9; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment This breaks every PR that touches a pyproject.toml (the workflow's paths filter triggers on those). Last successful run was 2026-04-01, before a behaviour change in uv or astral-sh/setup-uv@v7. The --system flag is exactly what the error message suggests and is correct here — we install pip into the runner's system Python; the downstream uv-lock.sh script creates its own venvs as needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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 selected for processing (1)
💤 Files with no reviewable changes (1)
Summary by CodeRabbit
WalkthroughThe GitHub Actions workflow ChangesCI Workflow Change
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| .github/workflows/uv-lock-automation.yaml | Removes the unused uv pip install pip step; the downstream uv-lock.sh script uses uv sync exclusively and never calls pip, so the removal is correct and unblocks the workflow. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub Actions Runner
participant UV as setup-uv@v7
participant SH as uv-lock.sh
participant UVS as uv sync (per dir)
participant GC as git-auto-commit-action
GH->>UV: Install uv 0.6.14 + Python 3.12.9
Note over GH: ~~uv pip install pip~~ (removed — unused)
GH->>SH: chmod +x && ./uv-lock.sh
loop For each directory
SH->>UVS: uv sync (generates uv.lock)
UVS-->>SH: lock file written
end
SH-->>GH: All lock files updated
GH->>GC: Commit uv.lock changes
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
.github/workflows/uv-lock-automation.yaml:39
**PR description doesn't match the actual change**
The PR title says "Add --system flag to uv pip install" and the description shows a `+` line with `--system` added, but the actual diff removes the `uv pip install --python=3.12.9 pip` step entirely rather than modifying it. The removal is correct — `uv-lock.sh` only calls `uv sync` and never invokes `pip` — but the commit message and PR description will mislead anyone reading the git history who expects to see the `--system` flag added rather than the step removed. Worth updating the PR description to reflect what was actually done.
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/UN-3448-FIX..." | Re-trigger Greptile
jaseemjaskp
left a comment
There was a problem hiding this comment.
uv-lock.shonly usesuv sync(line 74). It never invokespipdirectly, anduv syncmanages its own environments via uv. There's no reason to pre-install pip into the system Python at all. Confirmed by grepping —pipis referenced nowhere indocker/scripts/uv-lock-gen/`.
The line looks vestigial. The cleaner fix is to delete the line entirely rather than paper over with --system:
Per @jaseemjaskp's review: the pre-step `uv pip install ... pip` does nothing useful for this workflow. The downstream uv-lock.sh script uses uv sync at line 74, which manages its own venvs internally and never invokes pip directly: $ grep -rn 'pip' docker/scripts/uv-lock-gen/ docker/scripts/uv-lock-gen/uv-lock.sh:2:set -o pipefail Only match is pipefail (shell option), no real pip references. Removing the line entirely is cleaner than papering over with --system. The line was likely copy-pasted from a sibling workflow that legitimately needed pip in the system Python. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
uv pip install line in uv-lock-automation workflow
|
Test ResultsSummary
Runner Tests - Full Report
SDK1 Tests - Full Report
|
|
Good catch — verified |



What
uv pip install --python=3.12.9 pipline from.github/workflows/uv-lock-automation.yaml.Why
The line was failing the workflow on every PR that touches
pyproject.tomlsince 2026-04-01:The error appeared because
1997ce31e(PR #1883) bumpedsetup-uv@v5 → @v7, and v7 installs a uv-managed Python that isn't seen as system Python.Initial fix proposed: add
--systemflag (matching the pattern applied to other workflows in1997ce31e).Better fix per review: the line itself is vestigial. The downstream
docker/scripts/uv-lock-gen/uv-lock.shusesuv syncat line 74, which manages its own venvs internally and never invokespipdirectly:Only match is
pipefail(shell option), no realpipreferences. Pre-installing pip into the system Python serves no purpose for this workflow — the line was likely copy-pasted from a sibling workflow that legitimately needed pip.Reference: UN-3448.
How
- name: Install uv uses: astral-sh/setup-uv@v7 with: # Install a specific version of uv. version: "0.6.14" python-version: 3.12.9 - - run: uv pip install --python=3.12.9 pip - - name: Generate UV lockfilesTwo-line deletion. No replacement needed.
Can this PR break any existing features. If yes, please list possible items. If no, please explain why.
No. The deleted line did not contribute to the workflow's purpose:
pip(verified by grep).The workflow itself is non-blocking (other required checks gate merges), so worst case is "still broken" — but verification above shows the workflow will now successfully run
uv syncfor each directory.Database Migrations
None.
Env Config
None.
Related Issues or PRs
1997ce31e(PR [CHORE] Upgrade GitHub Actions to Node.js 24 compatible versions #1883)uv pip installline in uv-lock-automation workflow #1941, review4227913262Dependencies Versions
None changed.
Notes on Testing
pyproject.toml. This PR modifies a workflow file, not a pyproject, so the trigger won't fire here. The next PR that touches anypyproject.tomlafter this merges will be the real validation.workflow_dispatchis available on this workflow — a maintainer can run it post-merge to confirm.Screenshots
N/A — workflow file change.
Checklist
🤖 Generated with Claude Code