<@ULVA73B9P> I've got a Prefect flow that failed o...
# ask-marvin
e
@Marvin I've got a Prefect flow that failed on the first task State Failed Task Run ID 1e8a06bd-d3c6-4e46-a783-49ce77704ab9 Duration 1s Created 2024/05/15 012956 PM Tags None But the flow returns state "Completed", why?
m
The behavior you're encountering may be explained by how Prefect determines the final state of a flow run when there are multiple tasks involved. According to the Prefect documentation, if a flow returns a mix of states, the final state is determined by resolving all futures to states and then determining if any of these states are not
COMPLETED
. In other words, if all tasks within the flow run are completed, then the flow run's final state could be considered
Completed
even if some tasks have failed. However, this does seem quite unusual and it might be expected that the flow run should reflect a
Failed
state if any task within it fails. To better understand the specific issue, I recommend the following: - Check the Prefect documentation for more information about states and how the flow's final state is determined. Particularly, you want to understand the behavior when a task fails within a flow run: States Overview and Flow Concept. - Open an issue in the Prefect GitHub repository or search existing issues to see if anyone else has experienced the same problem: GitHub Issues. This behavior might be intentional or a bug, and the Prefect community or the GitHub repository issues can provide further insights.