Bruno Nirello
02/07/2025, 1:24 PMMarvin
02/07/2025, 1:25 PMtimeout_seconds
not being respected for subflows in Prefect 2.0. This problem is known and has been discussed in various contexts:
1. Documentation Insights: Prefect uses timeout_seconds
to prevent long-running flows. If a flow exceeds the specified duration, a timeout exception should be raised, marking the flow as failed. However, if the subflow ends up in a "Crashed" state, the parent flow might not be marked as "TimedOut" and can remain in a "Running" state indefinitely. This behavior can prevent alerts from being triggered as expected. Prefect Documentation on Timeouts.
2. GitHub Issues: There is a recognized issue where flows with "Crashed" subflows that exceed the timeout are stuck in the "Running" state. This can occur if the subflow crashes, and the parent flow's timeout does not trigger correctly, leaving the flow in an inconsistent state. GitHub Issue #7683.
Given these insights, you might want to track the mentioned GitHub issue for updates or consider reporting your specific case if it adds new context. Additionally, ensuring that your Prefect version is up-to-date might help, as bug fixes and improvements are continuously released.