Fix fallback worker image build broken by the deployment helper rename#1626
Merged
Conversation
Fixes #1625 gcp/cloud_run/worker.Dockerfile invokes the image preload helper by name inside a `python -c` string, which no Python tooling follows: the #1623 rename to preload_country_packages updated every Python caller but missed this one, so the failover staging deploy died with an ImportError building the fallback worker image (run 29121742131) while unit CI stayed green -- the failover deploy scripts are tested with a stubbed docker, so Dockerfile imports only execute in the real build. Update the reference and pin the class of break: a unit test scans every tracked Dockerfile for policyengine_household_api.deployment imports and asserts each name exists on the module, so a future rename fails in make test instead of mid-deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
anth-volk
marked this pull request as ready for review
July 10, 2026 21:07
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.
Fixes #1625
The v0.28.4 deploy (run 29121742131) failed at "Deploy Cloud Run failover to staging":
gcp/cloud_run/worker.Dockerfileinvokes the image preload helper by name inside apython -cstring, which no Python tooling follows — the #1623 rename topreload_country_packagesupdated every Python caller but missed this one, so the fallback worker image build died with anImportErrorwhile unit CI stayed green (the failover deploy scripts are tested with a stubbeddocker; Dockerfile imports only execute inside the real image build).Changes
gcp/cloud_run/worker.Dockerfile: import and callpreload_country_packages(behavior identical — the helper body is unchanged since the rename).tests/unit/test_deployment.py: a regression guard scans every git-tracked Dockerfile (git ls-files "*Dockerfile*"— catches bothDockerfile.*and*.Dockerfilenaming, the gap that hid this reference) forpolicyengine_household_api.deploymentimports and asserts each imported name exists on the module, so future renames fail inmake testinstead of mid-deploy.Context
The same failed run also validated the #1624 prewarm before stopping: post-deploy staging heavy calculates peaked at 6.3s in the Modal-direct lanes (previously 60–105s, past the gateway's 90s budget). The gateway lanes never ran because this Dockerfile break killed the failover deploy first — merging this unblocks the full pipeline.
Validation
tests/unit/test_deployment.py— 6 passed (guard verified to cover all six tracked Dockerfiles)make format-check— cleanmake test— full suite green: 672 passed, 1 skippedNo
modal_releaseblock: code-only change, no US/UK package version change.🤖 Generated with Claude Code