Skip to content

Propagate finalize_run status fetch failures - #6693

Open
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6691-finalize-run-raise
Open

Propagate finalize_run status fetch failures#6693
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6691-finalize-run-raise

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

Fixes #6691

Remove the broad exception swallow around in finalize_run. This ensures the route returns 5xx on transient errors so Pub/Sub/Eventarc retries, instead of silently leaving runs unfinalized with pending actions.

@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner August 22, 2026 02:03
Copilot AI lite review requested due to automatic review settings August 22, 2026 02:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the Eventarc-triggered run finalization path to stop swallowing Cloud Run execution status fetch failures, so transient upstream errors result in a 5xx response and Pub/Sub/Eventarc can retry instead of leaving runs unfinalized.

Changes:

  • Remove the broad try/except Exception in finalize_run around jobs.get_execution_status(...) so exceptions propagate to the HTTP layer.
  • Ensure transient Cloud Run API failures can trigger delivery retries rather than returning 204 and silently bailing out.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread services/hackbot-api/app/routers/runs.py
Remove the broad exception swallow around in `finalize_run`. This ensures the route returns 5xx on transient errors so Pub/Sub/Eventarc retries, instead of silently leaving runs unfinalized with pending actions.
@suhaibmujahid
suhaibmujahid force-pushed the worktree-fix-6691-finalize-run-raise branch from 94339cc to 60f4b58 Compare August 22, 2026 02:32
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.

ServiceUnavailable: The service is currently unavailable (get_execution)

2 participants