Hello all, I would appreciate some help or guidanc...
# ask-community
m
Hello all, I would appreciate some help or guidance on how to cancel all subflows after cancelling its parent flow. When I cancel the parent, the children seem to continue running and scheduling... I am running prefect 2.16.0 and use run_deployment to launch flows from the parent flow, running the jobs in an eks (kubernetes) cluster. Each subflow has n tasks with a retry of 1. The work queue has a flow run concurrency limit of 10, where more than 10 subflows are launched or scheduled. We have 1 gpu node running or dead start, while using an autoscaler to scale up the nodes with the workload. When I cancel the parent, some subflows cancel but the majority that are late, running, etc. continue to run or schedule to run. I notice this behaviour both locally and in our own cloud instance. I check the cluster and they are actually running too with their progress still being captured in the dashboard.
Here's an example, after I cancel the parent these still run. Then when I cancel these subflows, the late or pending subflows continue to run...
a
hello, I am also curious about this!!
m
@Alan I finally found the GitHub issue linked to this: https://github.com/PrefectHQ/prefect/issues/12864 Nothing in the documentation or slack community states what should happen despite most modern workflow orchestrators having accessible/documented options to override. Not having this feature breaks the ability to reliably scale and cancel ML or Data flows in a research environment when experimenting or if something goes wrong. Lot's of wasted compute on GPUs and time having our scientists manually kill subflows. We fiddled with cancellation hooks, server/client version, kubernetes configurations, manually managing states, etc.