Skip to content

Wait for Cloud Run routing convergence during promotion - #700

Merged
anth-volk merged 1 commit into
mainfrom
fix/cloud-run-routing-convergence
Sep 28, 2026
Merged

anth-volk merged 1 commit into
mainfrom
fix/cloud-run-routing-convergence

Conversation

@anth-volk

Copy link
Copy Markdown
Contributor

Fixes #699

Summary

Cloud Run can continue routing requests to the previous revision briefly after its service status reports that 100% of traffic has moved. The production deployment workflow previously made one immediate health request and restored the previous revision when that request reached the old revision.

This change lets stable and custom hostname checks wait for that documented routing transition without hiding unrelated deployment failures.

Changes

  • Pass the known previous revision to stable and custom hostname checks after promotion.
  • Retry only when a healthy response identifies that exact previous revision.
  • Use at most 24 attempts spaced five seconds apart by default.
  • Fail immediately for unhealthy responses, missing revision headers, and unrelated revisions.
  • Keep tagged candidate checks immediate and exact.
  • Add automated coverage for convergence, timeout, unexpected revisions, candidate behavior, and workflow argument wiring.

Testing

  • uv run pytest tests/test_deployment_assets.py -v — 25 passed
  • shellcheck .github/scripts/cloud-run-simulation-entry-smoke.sh
  • actionlint .github/workflows/simulation-deploy.reusable.yml
  • git diff --check

@anth-volk
anth-volk marked this pull request as ready for review September 28, 2026 22:49
@anth-volk
anth-volk merged commit bd9ea73 into main Sep 28, 2026
10 checks passed
@anth-volk
anth-volk deleted the fix/cloud-run-routing-convergence branch September 28, 2026 22:49
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.

Allow Cloud Run routing to converge before promotion verification fails

1 participant