prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Prevent workers from running flow runs scheduled for in process retry

Open desertaxle opened this issue 5 months ago • 4 comments

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

desertaxle avatar Sep 24 '24 17:09 desertaxle