Skip to main content

Action

This class represents a workflow action in the database. It stores comprehensive information about an action, including its identifier, parent action (if any), phase, source, trigger details, type, associated task references, and various serialized protobuf messages containing specifications and runtime details. It also tracks timestamps and abort-related information.

Attributes

AttributeTypeDescription
ProjectAction Identifier (unique across project/domain/run_name/name)
DomainAction Identifier (unique across project/domain/run_name/name)
RunNameAction Identifier (unique across project/domain/run_name/name)
NameAction Identifier (unique across project/domain/run_name/name)
ParentActionNameParent action (NULL for root actions/runs)
PhaseHigh-level status for quick queries/filtering. Stores the proto ActionPhase enum integer value directly (e.g. 1 = QUEUED).
RunSourceWho initiated this run(web, CLI, scheduler, etc.)
TriggerTaskNameTrigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER.
TriggerNameTrigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER.
TriggerRevisionTrigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER.
TriggerTypeTriggerType stores the automation type string (e.g. "TYPE_SCHEDULE").
ActionTypeAction type (task, trace, condition). Stores workflow.ActionType enum value.
ActionGroupGroup this action belongs to, if applicable.
TaskProjectTask reference columns
TaskDomainTask reference columns
TaskNameTask reference columns
TaskVersionTask reference columns
TaskTypeTask metadata columns
TaskShortNameTask metadata columns
FunctionNameTask metadata columns
EnvironmentNameTask metadata columns
ActionSpecActionSpec contains the full action specification proto
ActionDetailsActionDetails contains the full action details proto: - ActionStatus (phase, timestamps, error, cache status, etc.) - ActionAttempts array (all attempts with their phase transitions, cluster events, logs, etc.) - Any other runtime state
DetailedInfoDetailedInfo stores a serialized RunInfo proto containing metadata such as the task spec digest (for looking up the resolved spec) and storage URIs.
RunSpecRunSpec stores a serialized task.RunSpec proto (labels, annotations, envs, interruptible, cluster, etc.) for this action's run.
AbortRequestedAtAbort tracking — set when a user requests abort; cleared once the pod is confirmed terminated.
AbortAttemptCountAbort tracking — set when a user requests abort; cleared once the pod is confirmed terminated.
AbortReasonAbort tracking — set when a user requests abort; cleared once the pod is confirmed terminated.
CreatedAtCreatedAt is set by the DB (NOW()) on insert — represents when the action was queued.
UpdatedAtUpdatedAt is set by the DB (NOW()) on insert — represents when the action was queued.
EndedAtEndedAt is set when the action reaches a terminal phase.
DurationMsDurationMs is set when the action reaches a terminal phase.
AttemptsAttempts is set when the action reaches a terminal phase.
CacheStatusCacheStatus is set when the action reaches a terminal phase.

Methods


Clone()

@classmethod
def Clone() - > *Action

Clones the Action object, creating a new instance with the same field values.

Returns

TypeDescription
*ActionA new Action object that is a deep copy of the original.

GetRunName()

@classmethod
def GetRunName() - > string

Retrieves the name of the run associated with this action. Callers use this to identify the top-level execution context.

Returns

TypeDescription
stringThe name of the run.