Skip to content

fix(ci): correct warm-cache wheelhouse creation to fix env setup bug#1487

Merged
sd-db merged 2 commits into
mainfrom
sd-db/fix/warmcache-deterministic-pip
May 27, 2026
Merged

fix(ci): correct warm-cache wheelhouse creation to fix env setup bug#1487
sd-db merged 2 commits into
mainfrom
sd-db/fix/warmcache-deterministic-pip

Conversation

@sd-db
Copy link
Copy Markdown
Collaborator

@sd-db sd-db commented May 27, 2026

hatch run pip download in warmDepsCache.yml's wheelhouse step ran inside the default env. Default uses installer = "uv", whose venvs have no bin/pip, so hatch fell back to its bundled pip on Python 3.12. That pip evaluated python_version < "3.11" as False and silently dropped conditional deps like tomli from the wheelhouse.

  • Route the pip-download through verify-min-deps env (pip installer, Python 3.10).
  • Pin verify env to Python 3.10 so its wheels match the wheelhouse ABI
  • 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 recreates them from the cache alone. Catches future silent drops at warm-time.

sd-db added 2 commits May 27, 2026 19:10
…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.
@sd-db sd-db requested a review from jprakash-db as a code owner May 27, 2026 14:09
@sd-db sd-db changed the title fix(ci): route warm-cache pip-download through env with bin/pip; verify offline recreate fix(ci): correct warm-cache wheelhouse creation to fix env setup bug May 27, 2026
@github-actions
Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@sd-db sd-db merged commit df41e3a into main May 27, 2026
13 checks passed
@sd-db sd-db deleted the sd-db/fix/warmcache-deterministic-pip branch May 27, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant