Repository navigation
ci: install PGO host interpreter to avoid clobbering windows Python - #959
Conversation
|
(I think #958 is blocked by the same failure.) |
| id: pgo-python | ||
| shell: bash | ||
| run: | | ||
| uv python install 3.14 |
There was a problem hiding this comment.
🟠 High workflows/ci.yml:774
The non-Linux wheel builds fail when Maturin resolves 3.14t (and potentially 3.15t) because those host interpreters are no longer installed; uv python install 3.14 provides only the regular interpreter and runs only for the macOS PGO entry, while Windows installs none. Restore provisioning for the free-threaded interpreters required by the -i 3.14t ... 3.15t arguments before the wheel build.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/ci.yml around line 774:
The non-Linux wheel builds fail when Maturin resolves `3.14t` (and potentially `3.15t`) because those host interpreters are no longer installed; `uv python install 3.14` provides only the regular interpreter and runs only for the macOS PGO entry, while Windows installs none. Restore provisioning for the free-threaded interpreters required by the `-i 3.14t ... 3.15t` arguments before the wheel build.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This CI-only PR changes the PGO toolchain and compiler inputs used to build runtime wheels that are later published to PyPI, including floating interpreter resolution. Because it materially changes release artifact construction and reproducibility, it warrants human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/ci.yml">
<violation number="1" location=".github/workflows/ci.yml:774">
P3: The new PGO interpreter provisioning floats versions on every run: `uv python install 3.14` resolves the latest 3.14 patch, the container installs the *latest* uv via the curl script while the host side uses setup-uv's uv, and `--managed-python` then picks whichever managed 3.14 exists. This PR exists because interpreter-selection non-determinism broke the build, so pinning the exact interpreter (e.g. `uv python install 3.14.1` and a fixed uv version) would make the PGO profile inputs reproducible across runs.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| id: pgo-python | ||
| shell: bash | ||
| run: | | ||
| uv python install 3.14 |
There was a problem hiding this comment.
P3: The new PGO interpreter provisioning floats versions on every run: uv python install 3.14 resolves the latest 3.14 patch, the container installs the latest uv via the curl script while the host side uses setup-uv's uv, and --managed-python then picks whichever managed 3.14 exists. This PR exists because interpreter-selection non-determinism broke the build, so pinning the exact interpreter (e.g. uv python install 3.14.1 and a fixed uv version) would make the PGO profile inputs reproducible across runs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/ci.yml, line 774:
<comment>The new PGO interpreter provisioning floats versions on every run: `uv python install 3.14` resolves the latest 3.14 patch, the container installs the *latest* uv via the curl script while the host side uses setup-uv's uv, and `--managed-python` then picks whichever managed 3.14 exists. This PR exists because interpreter-selection non-determinism broke the build, so pinning the exact interpreter (e.g. `uv python install 3.14.1` and a fixed uv version) would make the PGO profile inputs reproducible across runs.</comment>
<file context>
@@ -768,21 +761,38 @@ jobs:
+ id: pgo-python
+ shell: bash
+ run: |
+ uv python install 3.14
+ echo "python=$(uv python find --managed-python 3.14)" >> "$GITHUB_OUTPUT"
+
</file context>
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 47863 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 63.83% 63.98% +0.15%
==========================================
Files 522 524 +2
Lines 130356 132888 +2532
Branches 277824 283043 +5219
==========================================
+ Hits 83210 85025 +1815
- Misses 47146 47863 +717
- Partials 5657 5763 +106Generated by Codecov Action |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
My understanding of the build failure in https://github.com/pydantic/monty/actions/runs/36858478859/job/110375062900 is that setup-python installing 3.14t caused maturin to select that 3.14t interpreter for
-i 3.14(might be a bug but it's kind of messy).Using uv, only installing interpreter if needed, and refactoring a little, should avoid that crash.
Summary by cubic
Fixes PGO wheel builds crashing on non-Linux runners where
setup-python's 3.14t interpreter overrode the uv-managed Python maturin was targeting.actions/setup-pythonwithastral-sh/setup-uvfor non-Linux PGO runs and installs the host interpreter viauv python.pgo-argsentries; the--pgo -iflags are built from the matrix runtime flag.RUSTFLAGSinto the container to work around LLVM corrupting them (see Failure to run PGO instrumentation on Rust 1.99.0 rust-lang/rust#163616).Written for commit 9190f64. Summary will update on new commits.