fix(ci): pin warm-cache pip to setup-python 3.10, not hatch's bundled pip#1483
Closed
sd-db wants to merge 1 commit into
Closed
fix(ci): pin warm-cache pip to setup-python 3.10, not hatch's bundled pip#1483sd-db wants to merge 1 commit into
sd-db wants to merge 1 commit into
Conversation
… pip Root cause: `hatch run pip` resolves to hatch's bundled pip running on Python 3.12. With `installer = "uv"` on the default env, uv-created venvs have no pip, so `hatch run pip` falls back to the hatch installer binary's pip (Python 3.12). That pip evaluates `python_version < "3.11"` as False and silently drops conditional deps like tomli from the wheelhouse — breaking offline env recreation on fork PRs whose verify-min-deps env transitively needs tomli on Python 3.10. Switch the wheelhouse step to setup-python's Python 3.10 directly (bootstrap tomli for the pyproject.toml parser; Python 3.10 has no stdlib tomllib). Add a guard step that fails the warm job if the wheelhouse can't satisfy verify-min-deps' dependency set from offline find-links alone, so future silent drops are caught at warm-time rather than in fork PRs.
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
hatch run pipinwarmDepsCache.yml's wheelhouse step resolves to hatch's bundled pip running on Python 3.12 (because the default env hasinstaller = "uv"and uv-created venvs have no pip, sohatch run pipfalls back to the hatch installer's pip). That pip evaluatespython_version < "3.11"as False and silently drops conditional deps liketomlifrom the wheelhouse — breaking offline env recreation on fork PRs whoseverify-min-depsenv transitively needs tomli on Python 3.10.Surfaced on fork PR #1482:
verify-min-deps:check-allfailed withERROR: Could not find a version that satisfies the requirement tomli<3.0,>=1.2; python_version < "3.11" (from check-wheel-contents)during offline env creation.Switch the wheelhouse step to setup-python's Python 3.10 directly. Add a guard step that fails the warm job if the wheelhouse can't satisfy
verify-min-depsoffline — so future silent drops are caught here, not on fork PRs.Test plan
sd-db/chore/warmcache-diagnoseprovedhatch run pip→pip 24.0 (python 3.12)and marker eval False under the bundled pip.python3.10 -m pip download check-wheel-contentscorrectly collected tomli + all 10 transitives.26440181725):Collecting tomli<3.0,>=1.2 (from check-wheel-contents)+ guard step green.