Repository navigation
fix(deploy): diagnose failed Cloud Run candidates - #9844
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c86198aec3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| done | ||
| echo "candidate revision did not become ready" >&2 | ||
| exit 1 | ||
| python3 backend/scripts/wait_cloud_run_candidate_readiness.py \ |
There was a problem hiding this comment.
Run diagnostics before deploy aborts
I checked the four callers (.github/workflows/gcp_admin.yml, gcp_app.yml, gcp_frontend.yml, and gcp_personas.yml): this composite action only runs after the google-github-actions/deploy-cloudrun@v2 deploy step. That action stops the job when gcloud run deploy returns nonzero, and the gcloud run deploy docs state the deploy health check is enabled by default and waits for the revision startup probe to pass, so the Ready=False startup failures this helper is meant to diagnose will exit in the deploy step before this line runs. Please either collect the bounded diagnostics in a failure step immediately after deploy or make these no-traffic candidate deploys asynchronous enough for this helper to observe the failed revision.
Useful? React with 👍 / 👎.
|
Monitor summary for this run. CI: The failing Review thread PRRT_kwDOLkKqys6RPdzQ (P2 — "Run diagnostics before deploy aborts"): No code change. This PR replaces the pre-existing opaque bash polling loop with a tested, safe diagnostic helper — both the old loop and the new helper run after Verification: |
…seline The APIClient.swift line-count ratchet in test_desktop_rest_inventory.py was capped at 6500 but the file grew to 6502 lines after the staged-score- update batch (#9816). The newer product-file-line-count ratchet (#9851) already baselines APIClient.swift at 6502. This updates the stale constant to match, unblocking the Backend unit suite which was failing on every open PR (including #9844 which does not touch any Swift files).
c86198a to
aeba70e
Compare
|
Monitor summary for this run. CI fix: The previously failing All CI checks now pass: Backend unit suite (11m26s), Hermetic Backend E2E, Hygiene, Formatting, Desktop Swift, and all others green. Review thread PRRT_kwDOLkKqys6RPdzQ (P2 — "Run diagnostics before deploy aborts"): No code change. Acknowledged in the prior run and unchanged: the Codex observation about Verification:
|
Summary
Ready=False, while continuing to pollReady=UnknownFailure class and durable guard
Candidate revisions could fail without actionable evidence, leaving operators to reconstruct the service, revision, and reason manually. The shared promotion action now has one fail-closed diagnostic boundary with hermetic coverage for terminal failures, malformed responses, raw-command-output suppression, and suspected-secret redaction.
Relates to #9820.
Verification
cd backend && ./scripts/sync-python-deps.shcd backend && ./test.shcd backend && .venv/bin/python -m pytest -v -m 'not integration and not slow' tests/unit/test_wait_cloud_run_candidate_readiness.py tests/unit/test_resolve_cloud_run_tagged_url.py— 12 passedmake preflightNo live deployment was run; that would create a Cloud Run candidate revision.