From 60f4b583aef2f2e7d51c411ec39795201bc4f184 Mon Sep 17 00:00:00 2001 From: Suhaib Mujahid Date: Fri, 21 Aug 2026 22:01:43 -0400 Subject: [PATCH] Propagate finalize_run status fetch failures 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. --- services/hackbot-api/app/routers/runs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/hackbot-api/app/routers/runs.py b/services/hackbot-api/app/routers/runs.py index 661b2d859f..332c14d303 100644 --- a/services/hackbot-api/app/routers/runs.py +++ b/services/hackbot-api/app/routers/runs.py @@ -243,8 +243,8 @@ async def finalize_run(db: AsyncSession, run: Run) -> None: try: exec_status = await jobs.get_execution_status(run.execution_name) except Exception: - log.exception("Failed to fetch execution status for run %s", run.run_id) - return + log.warning("Failed to fetch execution status for run %s", run.run_id) + raise if exec_status in (ExecutionStatus.pending, ExecutionStatus.running): if (