prefect
prefect copied to clipboard
Prevent workers from running flow runs scheduled for in process retry
This PR adds the retry_type
field to FlowRunPolicy,
so the server can determine if a flow will be retried via an already running process or needs to be rescheduled. Automatic retries will have retry_type
set to in_process
via the existing RetryFailedFlows
orchestration policy. The query to get scheduled flow runs has been updated to filter out flow runs that are in AwaitingRetry
but will be retried via an existing process. When transition out of a terminal state into a SCHEDULED
state (i.e. manual retries) the retry_type
will be set to reschedule
and will be given to workers for execution by the server.
Closes https://github.com/PrefectHQ/prefect/issues/15458