It seems likely that Flyte v1 does not natively support conditional execution of tasks based on the failure of previous tasks in the exact "try-catch" or "on-failure chain" pattern you described. In Flyte v1, workflows are typically defined as DAGs where task dependencies are based on data flow, and failure handling is generally at the workflow level using failure nodes or policies, not for chaining tasks on failure of previous ones. The available failure node feature allows you to specify a cleanup or error-handling task if any task in the workflow fails, but it does not support chaining multiple tasks to run sequentially only on the failure of the previous one—inputs to the failure node must match the workflow's inputs, and only one failure node is triggered per failure event, not a chain of them (
failure_node.md,
github PR discussion).
If you need this exact behavior, you would likely need to implement the failure logic inside a single Flyte task (using Python try/except), or consider upgrading to Flyte v2, which supports native Python error handling with try/except in workflows (
Flyte 2 docs). Would you like more detail or a code example for a workaround in Flyte v1?
Sources:
-
failure_node.md
-
github PR discussion
-
Flyte 2 docs 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.