https://prefect.io logo
j

Jeremy Phelps

01/14/2021, 8:18 PM
Hello Prefect community! Is there a way to make Prefect stop trying to execute a flow? There’s a pod in my Kubernetes cluster that is labelled with a particular flow run ID. It will never succeed because I took down the Docker registry it depends on. If I delete this pod, Prefect will create another one. The button in the Prefect UI to cancel the flow run was greyed out, so I simply deleted the flow run with the
delete_flow_run
GraphQL mutation, thinking that without the flow run's DB entry, Prefect would stop trying to execute it. That removed the flow run from the UI, but if I delete the associated Kubernetes pod, Prefect still recreates it. I found no subcommand in the
prefect
CLI tool that can solve this problem, either. Is there any way to stop Prefect from doing this?
j

jcozar

01/14/2021, 8:27 PM
Hi @Jeremy Phelps, I am not sure if this would work, but can you use the
SET STATE
button upright the flow run view and set the State to Finished?
j

Jeremy Phelps

01/14/2021, 8:27 PM
I tried that. It didn't work.
j

jcozar

01/14/2021, 9:00 PM
Retries are associated with tasks, not with flows. Therefore, I suppose that flow runs are being created by the scheduler, isn’t it? If this is the case maybe you can disable the scheduling
j

Jeremy Phelps

01/14/2021, 9:00 PM
I created the flow run manually.
j

jcozar

01/14/2021, 9:01 PM
Oh I see. In that case it might be a bug (or not, just that it cannot start the flow so it try and try again). Sorry I cannot help! 🙂
z

Zanie

01/14/2021, 9:02 PM
The flow run pod is likely being launched by a K8s
Job
which you’d need to delete
j

Jeremy Phelps

01/14/2021, 9:04 PM
Thanks! That worked.
z

Zanie

01/14/2021, 9:05 PM
Wonderful 🙂 basically it was Kubernetes trying to run it over and over, not Prefect. We’ll look into improving the experience in this edge case though.
3 Views