Skip to content

Commit

Permalink
logs exception if abort is raised during rescheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanluciano committed Sep 3, 2024
1 parent a5a3120 commit a06a740
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/prefect/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ async def add_flow(
entrypoint_type=entrypoint_type,
concurrency_limit=concurrency_limit,
)
self._logger.info(f"deployment {deployment}")
return await self.add_deployment(deployment)

@sync_compatible
Expand Down Expand Up @@ -1067,7 +1066,7 @@ async def _submit_run_and_capture_errors(
) as exc:
self._logger.info(
(
"Deployment %s has reached its concurrency limit when submitting flow run %s"
"Deployment %s reached its concurrency limit when attempting to execute flow run %s. Will attempt to execute later."
),
flow_run.deployment_id,
flow_run.name,
Expand Down Expand Up @@ -1171,8 +1170,13 @@ async def _propose_scheduled_state(self, flow_run: "FlowRun") -> None:
flow_run_id=flow_run.id,
)
self._logger.info(f"Flow run {flow_run.id} now has state {state.name}")
except Abort:
# Flow run already marked as failed
except Abort as exc:
run_logger.info(
(
f"Aborted rescheduling of flow run '{flow_run.id}'. "
f"Server sent an abort signal: {exc}"
),
)
pass
except Exception:
run_logger.exception(f"Failed to update state of flow run '{flow_run.id}'")
Expand Down

0 comments on commit a06a740

Please sign in to comment.