fix(ci): correct warm-cache wheelhouse creation to fix env setup bug#1487
Merged
Conversation
…erify offline recreate `hatch run pip download` ran in the default env. Default uses `installer = "uv"` so its venv has no bin/pip, and hatch fell back to its bundled pip on Python 3.12. That pip mis-evaluates `python_version < "3.11"` as False and silently drops conditional deps (e.g. tomli for check-wheel-contents) from the wheelhouse — breaking offline env recreation on fork PRs. Route the pip-download through `verify-min-deps` env, which uses the default pip installer and has bin/pip on Python 3.10. Either verify or verify-min-deps would work; verify-min-deps owns the wheelhouse on the consumer side, so it's the natural choice. Also add a post-warm "Verify all hatch envs can be re-created offline" step that prunes every just-warmed env, switches to offline mode, and re-creates them from the cache alone. Catches future silent-drop bugs at warm-time rather than in fork PRs.
verify previously had no `python = ` field, so hatch fell back to its bundled Python (3.12) when creating the env. The warm-cache wheelhouse contains cp310 wheels for ABI-specific packages (e.g. pydantic-core), so offline recreation of verify on 3.12 failed with "from versions: none" — caught by the new offline-recreate guard step. Pin verify to 3.10, matching verify-min-deps. verify only validates build artifacts (twine check, check-wheel-contents, pip install + dbt parse); the Python version doesn't change those outcomes, and 3.10 is the project's stated minimum.
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.
hatch run pip downloadinwarmDepsCache.yml's wheelhouse step ran inside the default env. Default usesinstaller = "uv", whose venvs have nobin/pip, so hatch fell back to its bundled pip on Python 3.12. That pip evaluatedpython_version < "3.11"as False and silently dropped conditional deps liketomlifrom the wheelhouse.verify-min-depsenv (pip installer, Python 3.10).verifyenv to Python 3.10 so its wheels match the wheelhouse ABI