Hello, I ran one of my Prefect jobs under the gke-...
# prefect-ui
s
Hello, I ran one of my Prefect jobs under the gke-pool work pool. In my @flow logic, I set retries = 0, but when the flow fails, it still moves to AwaitingRetry and restarts the job from the beginning. I could see that in empirical_policy, retries is set to 10, even though I explicitly set it to 0 in the @flow decorator. Can anyone explain why this is happening? And is there any way I could change this?
Copy code
Details:
{max_retries: 0, retry_delay_seconds: 0, retries: 10, retry_delay: 120, pause_keys: [], …}
b
Hey @Sandeep Kumar I think you'll get more visibility if you post in #CL09KU1K7. This channel is typically for Prefect User Interface questions.
What are you doing to cause your flow to fail?
How are you testing this?
If your Pod is evicted (deleted), by default, the Kubernetes worker will reschedule the flow run (move it into AwaitingRetry) assuming you have the default backoffLimit setting (
0
) https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py#L431