Steph Clacksman

    Steph Clacksman

    1 week ago
    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.
    Anna Geller

    Anna Geller

    1 week ago
    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
    Steph Clacksman

    Steph Clacksman

    1 week ago
    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!
    Anna Geller

    Anna Geller

    1 week ago
    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
    Steph Clacksman

    Steph Clacksman

    1 week ago
    Ok, thanks. Was this feature not in prefect 1? I thought I remembered cancelling runs in the UI before.
    Anna Geller

    Anna Geller

    1 week ago
    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
    Michael Adkins

    Michael Adkins

    1 week ago
    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.