https://prefect.io logo
Title
s

Samuel Kohlleffel

01/17/2023, 9:22 PM
Prefect Version: 2.7.8 Hello, I noticed that when I try to cancel a scheduled flow run in the Prefect Cloud UI, it gets stuck in the
canceling
state. How long should it take for a scheduled flow run to move into a
cancelled
state?
z

Zanie

01/18/2023, 4:49 AM
Is the agent that started the flow still running?
The agent is responsible for the transition to the CANCELLED state.
s

Samuel Kohlleffel

01/18/2023, 2:21 PM
Yes, the agent is running. Our Prefect Agent is Azure Kubernetes. There are no logs from the agent indicating that any flow run was cancelled or even entered a canceling state.
z

Zanie

01/18/2023, 3:56 PM
And the agent is on our latest version?
s

Samuel Kohlleffel

01/18/2023, 4:18 PM
The agent version is Prefect 2.7.8
z

Zanie

01/18/2023, 4:26 PM
That’s pretty weird. Does this happen for every run or is it just this one?
s

Samuel Kohlleffel

01/18/2023, 4:30 PM
It happens for every flow run that's in a
scheduled
state. I haven't tested canceling a flow run that's in a
running
state.
Here's a run that I tried cancelling just now:
z

Zanie

01/18/2023, 4:35 PM
mmm interesting. We might not actually handle the SCHEDULED -> CANCELLED transition yet
Thanks for the report!
👍 1
s

Samuel Kohlleffel

01/18/2023, 4:43 PM
What's weird is the flow was set to run at 10:35 CT, but never actually ran. It appears the run was actually cancelled in some way. It was just never reflected in the agent logs or in the Prefect Cloud UI.
z

Zanie

01/18/2023, 5:01 PM
Yeah it won’t run — this is just a book-keeping thing
👍 1