Skip to content

Fix fallback worker image build broken by the deployment helper rename#1626

Merged
anth-volk merged 1 commit into
mainfrom
fix/fallback-worker-preload-rename
Jul 10, 2026
Merged

Fix fallback worker image build broken by the deployment helper rename#1626
anth-volk merged 1 commit into
mainfrom
fix/fallback-worker-preload-rename

Conversation

@anth-volk

@anth-volk anth-volk commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1625

The v0.28.4 deploy (run 29121742131) failed at "Deploy Cloud Run failover to staging": 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 fallback worker image build died with an ImportError while unit CI stayed green (the failover deploy scripts are tested with a stubbed docker; Dockerfile imports only execute inside the real image build).

Changes

  • gcp/cloud_run/worker.Dockerfile: import and call preload_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 both Dockerfile.* and *.Dockerfile naming, the gap that hid this reference) for policyengine_household_api.deployment imports and asserts each imported name exists on the module, so future renames fail in make test instead 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 — clean
  • make test — full suite green: 672 passed, 1 skipped

No modal_release block: code-only change, no US/UK package version change.

🤖 Generated with Claude Code

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
anth-volk marked this pull request as ready for review July 10, 2026 21:07
@anth-volk
anth-volk merged commit 5870dc1 into main Jul 10, 2026
11 of 12 checks passed
@anth-volk
anth-volk deleted the fix/fallback-worker-preload-rename branch July 10, 2026 21:10
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.

Fallback worker image build still imports snapshot_tax_benefit_systems (renamed in #1623), failing the failover staging deploy

1 participant