Workflow Execution State Machine
This diagram illustrates the lifecycle of a Flyte workflow execution, as represented by the ActionPhase enum in the Flyte SDK. The execution progresses through a series of states, starting from QUEUED upon submission and ending in one of the terminal states: SUCCEEDED, FAILED, ABORTED, or TIMED_OUT. The state transitions are managed by the Flyte backend, and the SDK provides a view into this state machine.
Key Architectural Findings:
- The primary states of a workflow execution are defined in the
ActionPhaseenum located insrc/flyte/models.py. - The states include
QUEUED,WAITING_FOR_RESOURCES,INITIALIZING,RUNNING,SUCCEEDED,FAILED,ABORTED, andTIMED_OUT. - The terminal states are
SUCCEEDED,FAILED,ABORTED, andTIMED_OUT, as confirmed by theis_terminalproperty in theActionPhaseenum. - The Flyte SDK acts as a client to a remote backend, which manages the state transitions. The SDK reflects the state of the remote execution.
- For local executions, a simplified state machine (
running,succeeded,failed) is used for tracking, as seen insrc/flyte/_persistence/_run_store.py.
Loading diagram...