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
| Attribute | Type | Description |
|---|---|---|
| Project | Action Identifier (unique across project/domain/run_name/name) | |
| Domain | Action Identifier (unique across project/domain/run_name/name) | |
| RunName | Action Identifier (unique across project/domain/run_name/name) | |
| Name | Action Identifier (unique across project/domain/run_name/name) | |
| ParentActionName | Parent action (NULL for root actions/runs) | |
| Phase | High-level status for quick queries/filtering. Stores the proto ActionPhase enum integer value directly (e.g. 1 = QUEUED). | |
| RunSource | Who initiated this run(web, CLI, scheduler, etc.) | |
| TriggerTaskName | Trigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER. | |
| TriggerName | Trigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER. | |
| TriggerRevision | Trigger fields — only set for runs created via RUN_SOURCE_SCHEDULE_TRIGGER. | |
| TriggerType | TriggerType stores the automation type string (e.g. "TYPE_SCHEDULE"). | |
| ActionType | Action type (task, trace, condition). Stores workflow.ActionType enum value. | |
| ActionGroup | Group this action belongs to, if applicable. | |
| TaskProject | Task reference columns | |
| TaskDomain | Task reference columns | |
| TaskName | Task reference columns | |
| TaskVersion | Task reference columns | |
| TaskType | Task metadata columns | |
| TaskShortName | Task metadata columns | |
| FunctionName | Task metadata columns | |
| EnvironmentName | Task metadata columns | |
| ActionSpec | ActionSpec contains the full action specification proto | |
| ActionDetails | ActionDetails 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 | |
| DetailedInfo | DetailedInfo stores a serialized RunInfo proto containing metadata such as the task spec digest (for looking up the resolved spec) and storage URIs. | |
| RunSpec | RunSpec stores a serialized task.RunSpec proto (labels, annotations, envs, interruptible, cluster, etc.) for this action's run. | |
| AbortRequestedAt | Abort tracking — set when a user requests abort; cleared once the pod is confirmed terminated. | |
| AbortAttemptCount | Abort tracking — set when a user requests abort; cleared once the pod is confirmed terminated. | |
| AbortReason | Abort tracking — set when a user requests abort; cleared once the pod is confirmed terminated. | |
| CreatedAt | CreatedAt is set by the DB (NOW()) on insert — represents when the action was queued. | |
| UpdatedAt | UpdatedAt is set by the DB (NOW()) on insert — represents when the action was queued. | |
| EndedAt | EndedAt is set when the action reaches a terminal phase. | |
| DurationMs | DurationMs is set when the action reaches a terminal phase. | |
| Attempts | Attempts is set when the action reaches a terminal phase. | |
| CacheStatus | CacheStatus 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
| Type | Description |
|---|---|
*Action | A 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
| Type | Description |
|---|---|
string | The name of the run. |