https://prefect.io logo
Title
y

Ying Ting Loo

05/09/2023, 6:49 AM
Hi I have noticed that in some of the flows where the cancel/retry button is not on the top right of the ui before the 3 dot button and i have no way to kill the job (it has crashed)
>prefect version
Version:             2.8.7
API version:         0.8.4
Python version:      3.10.10
Built:               Thu, Mar 23, 2023 3:27 PM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         ephemeral
Server:
  Database:          postgresql
t

Tim Galvin

05/09/2023, 6:51 AM
Can you delete the job from the three dot button drop down?
Or you want it to remain in the history, just in the correct 'Cancelled' / 'Crashed' state? If so ignore my previous query šŸ˜›
y

Ying Ting Loo

05/09/2023, 6:59 AM
if i delete it means it wont be in history right? but it also wont show the state
i can delete it
j

justabill

05/09/2023, 6:38 PM
The cancel and retry buttons are only visible when the flow run is eligible to be cancelled or retried. We view this as an anti-pattern. We will update the UI to show the buttons, but grey them out when the flow is not eligible.
If you delete the flow run, it will be deleted from the history.
y

Ying Ting Loo

05/15/2023, 5:28 AM
what is the option i have if i dont want to delete it from the history and dont want it to ā€œkeep runningā€?
j

justabill

05/15/2023, 1:29 PM
Hm, if the process in fact crashed, Prefect should reflect that with a
CRASHED
state. I'm need to know more about your infrastructure and code to understand why that didn't happen, but if this is an isolated issue, you can use the set_flow_run_state method to manually set it to a
CRASHED
state.
y

Ying Ting Loo

05/15/2023, 1:30 PM
ok the background is, it is a parent flow triggering a subflow. The parent flow crashed, but the subflow is still running and theres no cancel or any other button available