https://prefect.io logo
m

Mark McDonald

07/09/2020, 8:35 PM
hi - in Cloud, I've notice that when marking a flow state (both with and without its children option marked) as "failed" or "cancelled", the flow's task that is currently running continues to run. This is apparent in Fargate/ECS and in the live cloud logs. Only after these prefect tasks complete will the flow stop executing. For the most part, this isn't a problem but we have some tasks that can run for hours. If I mark the flow as failed during the execution of one of these tasks, it's not great because they'll continue using resources. My question is, what's the appropriate way to a kill a flow run and immediately stop the running tasks? Do I have to do this from ECS? Ideally, marking a flow as "failed" would stop the running task in ECS.
👀 1
l

Laura Lorenz (she/her)

07/09/2020, 8:41 PM
Hiya @Mark McDonald. What you are observing is the current best guarantee of cancellation; only stopping downstream, unsubmitted tasks. Cancellation is something we are actually actively working on right now and the current details on the thinking and progress is at this github issue: https://github.com/PrefectHQ/prefect/issues/2771 There’s some more conversation about it, including with another person on fargate, in this thread: https://prefect-community.slack.com/archives/CL09KU1K7/p1591896868225300
m

Mark McDonald

07/09/2020, 8:43 PM
ah got it. Thanks, @Laura Lorenz (she/her). I'll keep my eye on this issue.
👍 1