<@ULVA73B9P> give me a breakdown on what the flow ...
# ask-marvin
m
@Marvin give me a breakdown on what the flow states mean? I can see late and infra pending for example, what is the full list and their definitions?
m
thought for 125.3 seconds
Here’s the full breakdown of flow run states in Prefect 3.x. A useful mental model is: - State type = the broad category (
SCHEDULED
,
RUNNING
, etc.) - State name = the specific label you see in the UI (
Late
,
InfrastructurePending
, etc.) Some names are just special cases of the same underlying type. Docs / references: - Prefect docs - State reference - Client schema reference --- ## 1) Core state types These are the main state categories a flow run can be in: | Type | Meaning | Terminal? | |---|---|---| |
SCHEDULED
| The flow run is planned for execution, but not running yet | No | |
PENDING
| The flow run has been submitted and is waiting on prerequisites or infrastructure | No | |
RUNNING
| The flow run is actively executing | No | |
PAUSED
| Execution has stopped and is waiting to be resumed | No | |
CANCELLING
| Cancellation has been requested and cleanup is in progress | No | |
COMPLETED
| The flow run finished successfully | Yes | |
FAILED
| The flow run finished unsuccessfully due to an execution/code error | Yes | |
CRASHED
| The flow run stopped because of an infrastructure/system issue | Yes | |
CANCELLED
| The flow run was cancelled | Yes | --- ## 2) Full list of common flow state names and what they mean ### Scheduled-type states These all fall under
SCHEDULED
. -
Scheduled
The run is set to start at a future time. -
Late
The scheduled start time has already passed, but the run has not been picked up yet. Usually this means a worker hasn’t submitted it to infrastructure yet. Common causes: - no active worker polling the right work pool / queue - worker is unhealthy or offline - concurrency limits are blocking execution - infrastructure provisioning is delayed before pickup -
AwaitingRetry
The flow run failed on an attempt, but retries remain, so it is waiting for the retry delay before trying again. -
AwaitingConcurrencySlot
The run is ready in principle, but it must wait for a concurrency slot before it can proceed. -
Resuming
The flow was paused or suspended and is scheduled to resume. --- ### Pending-type states These all fall under
PENDING
. -
Pending
The flow run has been submitted but hasn’t started execution yet. It’s waiting for preconditions to be satisfied. -
Submitting
Prefect is actively submitting the run to execution infrastructure. -
InfrastructurePending
The run has been submitted, and Prefect is waiting for the underlying infrastructure to become ready. Example: a container, pod, or job is being created but isn’t running user code yet. This is the one you mentioned as infra pending. --- ### Running-type states These fall under
RUNNING
. -
Running
The flow code is currently executing. -
Retrying
A retry attempt is actively executing after a prior failure. --- ### Paused-type states These fall under
PAUSED
. -
Paused
Execution is intentionally stopped and waiting for manual or programmatic resume. -
Suspended
Similar to paused, but the process has exited and will need to be resumed later rather than just continuing in-memory. --- ### Completed-type states These fall under
COMPLETED
and are terminal. -
Completed
The flow finished successfully. -
Cached
The result was retrieved from cache instead of recomputing. -
RolledBack
The run reached completion but a transaction was rolled back and rollback hooks were executed. --- ### Failed-type states These fall under
FAILED
and are terminal. -
Failed
The run ended with an error/exception and no more retries remain. -
TimedOut
The run exceeded its configured timeout and was marked failed. --- ### Crashed-type states These fall under
CRASHED
and are terminal.
-
Crashed
The run stopped because of an infrastructure or system-level issue rather than a normal code exception. Typical examples: - process killed - pod evicted - out-of-memory - worker/interpreter interruption - abrupt infrastructure shutdown --- ### Cancelling / Cancelled -
Cancelling
(
CANCELLING
) A cancellation request has been issued, and Prefect is attempting to stop the run and clean up infrastructure. -
Cancelled
(
CANCELLED
, terminal) The run has been cancelled and will not continue. --- ## 3) Quick “what should I infer?” guide ### If you see Late Think: “This run should have started already, but nothing picked it up.” Check: - is a worker running? - is it polling the correct work pool / queue? - is the deployment assigned correctly? - are concurrency limits blocking it? ### If you see InfrastructurePending Think: “Prefect has handed this off, but the execution environment isn’t ready yet.” Check: - container/job/pod startup delays - cloud batch system delays - image pull time - cluster capacity / autoscaling ### If you see Pending Think: “The run is in the handoff phase before actual code execution.” ### If you see Crashed Think: “This looks more like environment/infrastructure failure than user code failure.” ### If you see Failed Think: “The flow code itself raised an error or otherwise failed logically.” --- ## 4) Typical lifecycle A normal run often looks like:
Copy code
text
Scheduled
  -> Pending
  -> Running
  -> Completed
A delayed pickup might look like:
Copy code
text
Scheduled
  -> Late
  -> Pending
  -> Running
  -> Completed
A retrying run might look like:
Copy code
text
Running
  -> Failed
  -> AwaitingRetry
  -> Retrying
  -> Completed
A run waiting on infra might look like:
Copy code
text
Scheduled
  -> Pending
  -> Submitting
  -> InfrastructurePending
  -> Running
--- ## 5) Terminal vs non-terminal summary Terminal states: -
COMPLETED
-
FAILED
-
CRASHED
-
CANCELLED
Non-terminal states: -
SCHEDULED
-
PENDING
-
RUNNING
-
PAUSED
-
CANCELLING
--- If you want, I can also give you: 1. a flow-state transition diagram, or 2. the same breakdown for task run states specifically.