Hello Prefect community! Is there a way to make Pr...
# prefect-community
j
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
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
I tried that. It didn't work.
j
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
I created the flow run manually.
j
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
The flow run pod is likely being launched by a K8s
Job
which you’d need to delete
j
Thanks! That worked.
z
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.