Hey all, it was my understanding that if any task ...
# ask-community
d
Hey all, it was my understanding that if any task in a flow run fails, the flow will end up as failed, however I've just had my flow return with state Success despite having 1 failed task run, and 3 skipped task runs. Is this expected behaviour? Context - it's a very large static flow ~1250nodes. Prefect version 0.14.14, K8s + Dask execution
Flow run ID
2fbd7ced-da92-4f15-bfce-e3dd42c34b0c
a
Not quite:
Copy code
When a flow runs, its state is determined by the state of its reference tasks. By default, a flow's reference tasks are its terminal tasks, which includes any task that has no downstream tasks. If the reference tasks are all successful (including any skipped tasks), the flow is considered a Success. If any reference tasks fail, the flow is considered Failed.
https://docs.prefect.io/core/concepts/flows.html#reference-tasks So it's possible for a flow to be successful despite some tasks failing, as long as all the reference tasks are successful (and all tasks are finished).
upvote 2
🙌 1
d
Ah I see! Thanks so much for clarifying that, I'd mis-read the definition of reference tasks 🤦 I'll add something to the flow handler to ensure it fails if any task has failed 👍