<@U06RKAMK0UC> Can I "ABORT" a workflow from insid...
# ask-ai
a
@ancient-wolf-19325 Can I "ABORT" a workflow from inside a workflow/task without calling the API? Preferably by raising some type of Abort exception?
j
No, Flyte does not support aborting a workflow from inside a workflow or task by raising an exception or a special "Abort" error. Aborting a workflow is only possible via external actions, such as using the Flyte UI, CLI, or API to terminate the execution. Raising an exception inside a task will cause that task (and potentially the workflow) to fail, but it will not trigger an "ABORT" state—only a "FAILED" state as per the workflow state machine. There is no documented mechanism to programmatically abort the workflow from within its own code without an external API call or user intervention. This limitation is confirmed in community discussions and issues, where users have requested the ability to abort from within a workflow, but maintainers have clarified that this is not currently supported and would require significant architectural changes to Flyte's state management and reconciliation logic. The only way to abort is through external means, not from within the workflow/task code itself (source, source). Would you like more detail on how workflow/task failures are handled or on external abort mechanisms? Sources: - https://github.com/flyteorg/flyte/issues/3854 - https://github.com/flyteorg/flyte/issues/2653 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.