How do I cancel a flow run in prefect 2 cloud? I can see how to delete it, but I want to keep the logs but not have it run any more.
09/13/2022, 10:45 AM
if you have access to the infra, you could cancel it there e.g. by killing the process on that machine or the K8s job
09/13/2022, 10:47 AM
It's running on fargate, so it's not easy to kill the process on the machine. Will deleting the flow run also cancel it? I'd rather keep the logs in prefect cloud if possible, but definitely want to cancel the run!
09/13/2022, 10:48 AM
we are aware of the problem, but this is hard to do in a hybrid model, we'll likely add better support for handling that in the future but this is not on the immediate roadmap, to be transparent.
if you delete a flow run, deleting a flow run will actually also trigger an interruption to the flow run process, so it will cancel it but yes, your logs would be gone
yup it should
09/13/2022, 10:50 AM
Ok, thanks. Was this feature not in prefect 1? I thought I remembered cancelling runs in the UI before.
09/13/2022, 1:34 PM
let's focus on the future, forget 1.0 :)
we are aware and we'll tackle it at some point for sure because it's important
09/13/2022, 5:26 PM
Cancellation can be tricky because interrupting running code is either not possible or very complicated in Python. Many libraries choose not to allow cancellation of tasks once they’ve started running. Other times, they can perform “soft cancellation” in which the rest of the code moves on but the task continues running in the background. There’s a lot of variance in user expectations for cancellation and we’re still figuring out the best way to meet the majority of our user’s expectations while providing a robust and consistent cancellation method.