Isolate Poetry validation into its own release-only job - #8075
Merged
Conversation
The Poetry-based validation was sourced inline inside the main manywheel matrix job in validate-linux-binaries.yml, gated by a 5-condition check, and Poetry itself was installed from its dev branch (poetry@main). When Poetry's main branch regressed, the whole binary-validation job went red for the stable-CUDA Python 3.11 combination, masking the actual binary signal. Three coordinated changes: 1. Split the Poetry test into a standalone linux-poetry job modeled on the existing linux-amazon-2023 job. The new job only runs on inputs.channel == 'release' and exports a fixed Python 3.11 / stable-CUDA combination, matching what the old inline gate selected. 2. Drop the inline `source validate_poetry.sh` block from the main matrix job so Poetry ecosystem churn can no longer flake binary validation. 3. In validate_poetry.sh, pin Poetry to a released version via POETRY_VERSION (default 2.4.1, env-overridable) instead of installing from poetry@main, and replace `--quiet` with `--no-interaction` so resolution errors are no longer silently swallowed. Authored with Claude Code.
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
atalman
added a commit
that referenced
this pull request
May 13, 2026
…ython (pytorch/vision#9307) (#8077) ## Summary Fixes the `poetry-test` job's release-channel failure observed in [run 25819051911](https://github.com/pytorch/test-infra/actions/runs/25819051911/job/75855222112). The root cause is the torchvision-side bug tracked in [pytorch/vision#9307](pytorch/vision#9307): torchvision 0.27.0's wheel metadata excludes Python 3.14.1 specifically (`Requires-Python: !=3.14.1,>=3.10`). Combined with Poetry's strict resolver, this blocks the smoke test entirely. ## Why this breaks `validate_poetry.sh` previously called `poetry new test_poetry`, which writes an **open-ended** `requires-python = ">=X.Y"` (e.g. `">=3.11"`) into the generated `pyproject.toml`. Poetry's resolver then has to find a torchvision version that's installable across the project's entire declared Python range — including Python 3.14.1. Because torchvision 0.27.0 excludes that exact patch ([pytorch/vision#9307](pytorch/vision#9307)), no version is lockable: ``` The current project's supported Python range (>=3.11) is not compatible with some of the required packages Python requirement: - torchvision requires Python !=3.14.1,>=3.10, so it will not be installable for Python 3.14.1 Because no versions of torchvision match >0.27.0,<0.28.0 and torchvision (0.27.0) requires Python !=3.14.1,>=3.10, torchvision is forbidden. So, because test-poetry depends on torchvision (^0.27.0), version solving failed. ``` (This error only became visible after #8075 dropped `--quiet` from the `poetry add` calls.) ## Fix Replace `poetry new test_poetry` with `poetry init --no-interaction --python ">=X.Y,<X.(Y+1)"`, which writes a **narrow** Python range into the generated `pyproject.toml` directly. For `MATRIX_PYTHON_VERSION=3.11` the project ends up at `requires-python = ">=3.11,<3.12"`. That range excludes 3.14.1 entirely, so torchvision's `!=3.14.1` constraint no longer applies and resolution succeeds. This is also more accurate: the test now reflects the runtime we actually set up via `conda create python=${MATRIX_PYTHON_VERSION}`, rather than the open-ended `">=X.Y"` Poetry defaults to. No workflow-file changes — `linux-poetry:` is already present on `main` from #8075. The cosmetic display of `linux-poetry:` in this PR's diff is a GitHub artifact (the merge-base predates #8075's squash merge); the workflow file content is byte-identical to `pytorch/test-infra:main` and the merge will be a no-op on it. ## Test plan - [x] Diagnosed against [run 25819051911](https://github.com/pytorch/test-infra/actions/runs/25819051911/job/75855222112), the first run that surfaced Poetry's real error after `--quiet` was removed. - [ ] CI on this PR's release-channel `poetry-test` job re-runs `poetry add torch torchvision` cleanly. ## Upstream tracking - [pytorch/vision#9307](pytorch/vision#9307) — torchvision excludes Python 3.14.1 in its wheel metadata. Authored with Claude Code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Poetry-based validation was sourced inline inside the main
manywheelmatrix job invalidate-linux-binaries.yml, gated by a 5-condition check, and Poetry itself was installed from its dev branch (poetry@main). When Poetry's main branch regressed, the whole binary-validation job went red for the stable-CUDA Python 3.11 combination, masking the actual binary signal. See this failed run for the most recent example.Three coordinated changes:
1. Split Poetry into a standalone
linux-poetryjobIn
.github/workflows/validate-linux-binaries.yml, the inlinesource validate_poetry.shblock (with its 5-condition gate) is removed from thelinux:matrix job. A newlinux-poetry:top-level job is added, modeled on the existinglinux-amazon-2023:job:It runs only on
inputs.channel == 'release'and exports a fixed Python 3.11 / stable-CUDA combination, matching what the old inline gate selected.2. Pin Poetry to a released version
In
.github/scripts/validate_poetry.sh:Installing from
poetry@mainhas caused recurring CI flakes whenever Poetry's dev branch regresses.POETRY_VERSIONis env-overridable; bump deliberately to upgrade.3. Surface Poetry's actual error
poetry --quiet add ...silenced resolution errors (today'sexit 1had no further output). Replaced withpoetry add --no-interaction ...so resolution errors print but Poetry still doesn't prompt.Test plan
bash -n .github/scripts/validate_poetry.shpasses.linux-poetry:job mirrors the existinglinux-amazon-2023:job structure; both reuselinux_job_v2.ymlwith the same input shape.releasechannel that the newlinux-poetryjob appears and runs; verify onnightly/testchannels that it is skipped.validate-linux-binariesrun is no longer red when Poetry's main is broken.Effect on
vllm#40077-style flakesmanywheel-py3_11-cuda13_0job → looks like a binary regressionpoetry-testjob only; binary validation is unaffected--quiethides the real error--no-interactionkeeps prompts off but lets errors print@main${POETRY_VERSION:-2.4.1}channel == 'release'onlyAuthored with Claude Code.