ci(unit-tests): use python -m pip for vision golden deps#1518
Conversation
Bare `pip install` is flaky on the self-hosted k8s-runner-cpu pool: `actions/setup-python@v6` reliably exposes `python` on PATH but not always `pip`, producing intermittent `pip: command not found` (exit 127) at the "Generate vision golden fixtures" step. Invoke pip via `python -m pip` so the shim is resolved through the interpreter that setup-python provisioned, which removes the PATH dependency. No behavior change otherwise. Signed-off-by: key4ng <rukeyang@gmail.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates the PR test workflow to modernize Python package installation commands. The "Generate vision golden fixtures" step in the ChangesCI Workflow Maintenance
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 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)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
Description
Problem
The
unit-testsjob's "Generate vision golden fixtures" step intermittently fails with:Example: run 26246631641 on PR #1516.
The step uses bare
pip install .... On the self-hostedk8s-runner-cpupool,actions/setup-python@v6reliably putspythonon PATH but doesn't always exposepip— the prior step in the same job ("Set up Python") completes successfully, so the interpreter is provisioned, but thepipshim isn't always discoverable. The same step has succeeded on other runs (e.g. main run 26212745181), so it's an intermittent runner-environment issue, not a deterministic break.Solution
Invoke pip via
python -m pipso the shim is resolved through the interpreter thatsetup-pythonset up, removing the PATH dependency. This is the same idiom already used elsewhere in this workflow (e.g.python-unit-testsjob usespython3 -m pip install ...).Changes
.github/workflows/pr-test-rust.yml: change twopip installinvocations in the "Generate vision golden fixtures" step topython -m pip install. Also drops the stray blank line between them.Test Plan
Checklist
cargo +nightly fmtpasses (workflow-only change)cargo clippy --all-targets --all-features -- -D warningspasses (workflow-only change)Summary by CodeRabbit