A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Workflow Next

Phases and the WorkflowRun Lifecycle

A WorkflowRun goes through a short life: it starts, runs its steps, may stop to wait, and finishes. Its phase is in status.status, and each step's in status.steps.

WorkflowRun phases​

PhaseMeaning
initializingThe WorkflowRun has been created and no step has started.
executingA step is running.
suspendingA step is suspended, waiting for vela workflow resume or its duration.
terminatedThe WorkflowRun was terminated.
failedEvery step has finished and at least one failed.
succeededEvery step has finished and each one succeeded or was skipped.

kubectl get workflowrun shows the phase in its PHASE column.

Step phases​

PhaseMeaning
runningThe step is running.
suspendingThe step is suspended.
pendingThe step is waiting for something before it can run, such as its inputs.
succeededThe step succeeded.
failedThe step failed.
skippedThe step was skipped.

A failed step has a message with the error and a reason:

ReasonMeaning
ExecuteThe step failed while running.
TerminateThe step was terminated.
OutputThe step failed to write one of its outputs.
FailedAfterRetriesThe step failed and hit the retry limit.
TimeoutThe step ran past its timeout.
ActionThe step's definition called op.#Fail.

Waiting and retrying​

A step that waits for a condition, such as a Deployment becoming ready, stays running and is tried again after a backoff. A step that fails is retried too, up to a limit, and then fails with FailedAfterRetries. The backoff times and limits, and the flags that change them, are in Workflow Working Mechanism.

Once a run has finished​

A WorkflowRun runs once. When it reaches succeeded, failed or terminated, status.finished is true and the controller stops reconciling it:

  • Editing the spec does nothing. The steps don't run again. To run them again, use vela workflow restart, or delete the WorkflowRun and create it again.
  • Deleting it deletes only the WorkflowRun. The objects its steps created stay where they are, since nothing owns them. Objects applied with vela/kube carry the labels workflowrun.oam.dev/name and workflowrun.oam.dev/namespace, so kubectl get configmaps -l workflowrun.oam.dev/name=<run> finds them.
  • Restart starts from the top, or from one step with --step: see Workflow Operations.

An Application's workflow is different: vela-core runs it again whenever the Application changes, and keeps what it applied in place in between.