hi - in Cloud, I've notice that when marking a flo...
# prefect-community
m
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
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
ah got it. Thanks, @Laura Lorenz (she/her). I'll keep my eye on this issue.
👍 1