fix(ci): resolve release deps from PyPI, not just TestPyPI - #790
Merged
Conversation
The pre-release-checks job installed the freshly built package with --extra-index-url pointing at TestPyPI. uv gives extra indexes higher priority and defaults to the first-index strategy, so it pinned every dependency to the first index containing it. When TestPyPI hosts an incompatible version of a dependency (e.g. aiohttp 3.8.1), it shadowed the good version on PyPI and broke resolution with 'No solution found'. Add --index-strategy unsafe-best-match so uv considers all indexes and picks the best compatible version, and --prerelease=allow to silence the misleading pre-release hint uv emits for compatible-release specifiers like aiohttp~=3.14 (normalized to >=3.14,<4.dev0). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Facundo Santiago (santiagxf)
enabled auto-merge (squash)
June 30, 2026 14:36
auto-merge was automatically disabled
June 30, 2026 14:51
Head branch was pushed to by a user without write access
Facundo Santiago (santiagxf)
enabled auto-merge (squash)
June 30, 2026 15:01
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.
Problem
The
pre-release-checksjob in_release.ymlinstalls the freshly built package to smoke-test it before publishing:The comment claimed PyPI is the primary index and TestPyPI is only a fallback. That assumption is wrong for uv:
--extra-index-urlindexes higher priority than the default index, and--index-strategyisfirst-index, which pins each package to the first index that contains it and never looks further.So for a dependency like
aiohttp, uv checks TestPyPI first, finds only an old version there (e.g.aiohttp==3.8.1from the shared TestPyPI namespace), pins to that index, and never falls back to PyPI's3.14.x. Resolution fails with:This is inherently fragile — any dependency that happens to exist on TestPyPI at an incompatible version breaks the release.
Fix
Add two flags to the three
uv pip installinvocations that use TestPyPI:--index-strategy unsafe-best-match— the real fix. uv considers all indexes for every package and picks the best compatible version, so deps come from PyPI while the just-uploadedPKG==VERSIONcomes from TestPyPI. This is the pattern uv documents for combining PyPI + TestPyPI.--prerelease=allow— silences the misleading pre-release hint uv emits for compatible-release specifiers (aiohttp~=3.14normalizes to>=3.14,<4.dev0, whose.dev0upper bound trips uv's pre-release detection). Matches upstream LangChain's release workflow.The stale comment is updated to reflect uv's actual index-priority behavior.
Notes
--index-strategy unsafe-best-matchrelaxes dependency-confusion protection, but this is the documented approach for the PyPI + TestPyPI smoke test. The job holds no publishing credentials —id-token: writelives only in the separatepublishjob, which is untouched.uv syncand the min-version steps don't use TestPyPI and are unaffected.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com