Hey folks :wave: We are experiencing an interesti...
# ask-community
a
Hey folks 👋 We are experiencing an interesting behaviour with Prefect 1.4.0 and flows that run with ECSRun config on an ECS Agent. When a flow is cancelled, either from the UI or by calling
client.cancel_flow_run
, it seems the ECS task of the flow run is not stopped and stays in the Running state indefinitely. Has anyone experienced such behaviour? Is this expected or not? Thanks!
cc @grandimk
d
Experiencing this as well. Did you manage to get a reply elsewhere or find a solution @ale?
a
Hey @Dylan 👋 We ended up raising an
ENDRUN
signal instead of calling
client.cancel_flow_run
By doing this, Prefect is able to decommission the ECS task of the flow properly
d
Hi @ale, thanks for replying. Glad you managed to find a workaround. I'm wondering if I can achieve the same with Prefect 2.8, preferably through the API. I'm unfamiliar with signals, do you have a link to any Prefect documentation? Struggling to find it in here - https://docs.prefect.io/2.10.7/api-ref/prefect/client/base/
a
Hey @Dylan I’m not sure signals exist in Prefect 2.x And I don’t have much experience with Prefect 2.x, so I suggest you to ask in #CL09KU1K7 😊
d
Gotcha, thanks Ale
a
You’re welcome 😊