Skip to main content

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 ActionPhase enum located in src/flyte/models.py.
  • The states include QUEUED, WAITING_FOR_RESOURCES, INITIALIZING, RUNNING, SUCCEEDED, FAILED, ABORTED, and TIMED_OUT.
  • The terminal states are SUCCEEDED, FAILED, ABORTED, and TIMED_OUT, as confirmed by the is_terminal property in the ActionPhase enum.
  • 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 in src/flyte/_persistence/_run_store.py.
Loading diagram...