Karthik
05/22/2024, 4:36 AMpending
state for >5 min, I need to
1. send a slack notification
2. cancel the flow run
3. Create a new deployment for the same flow with the same paylaod
I could get the first 2 steps working fine, but I’m stuck on the third step. If I add an action that says Run a deployment
and set it to Infer Deployment
, I don’t see a way for me to specify for it to use the same payload that was passed into the flow run that was just cancelled. Can someone please guide me on how to go about this. ThanksAlexander Azzam
05/22/2024, 11:16 AMKarthik
05/22/2024, 11:26 AMChris Guidry
05/22/2024, 1:37 PMRunDeployment
action, we don't (currently) have access to the parameters from the prior flow run. Let me look into another avenue with the AwaitingRetry
state to see if it would work for you, that may be a good alternative.Chris Guidry
05/22/2024, 1:58 PMChris Guidry
05/22/2024, 2:00 PMchange-flow-run-state
) and picking the state type SCHEDULED
and using the name AwaitingRetry
(this matches Prefect's retrying state).
When I do this and cause my worker to crash while a flow is pending, the automation puts it right back to AwaitingRetry
after the time expires, then the same flow run attempts to run again. This will carry all of the flow run's information with it, like the parameters, infrastructure configuration, etc.Chris Guidry
05/22/2024, 2:01 PMRetryFlowRun
action that does this for you so it's just a simple choice from the dropdownKarthik
05/23/2024, 4:44 AMChris Guidry
05/23/2024, 5:12 PM