Skip to main content

RunService

No overview available.

Methods


RecordAction()

@classmethod
def RecordAction(
ctx: context.Context,
req: *connect.Request[workflow.RecordActionRequest]
) - > *connect.Response[workflow.RecordActionResponse], error

Records a single action, including its details and status, within a workflow run. This method is used to persist the state of an action.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.RecordActionRequest]The request containing the action details to be recorded.

Returns

TypeDescription
*connect.Response[workflow.RecordActionResponse], errorA response containing the result of the action recording operation, or an error if the operation failed.

RecordActionStream()

@classmethod
def RecordActionStream(
ctx: context.Context,
stream: *connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]
) - > error

Establishes a bidirectional stream to record multiple actions. This allows for efficient, continuous updates of action states.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
stream*connect.BidiStream[workflow.RecordActionStreamRequest, workflow.RecordActionStreamResponse]The bidirectional stream for sending action recording requests and receiving responses.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

recordAction()

@classmethod
def recordAction(
ctx: context.Context,
req: *workflow.RecordActionRequest
) - > *workflow.RecordActionResponse

Records a single action internally, processing the provided action request. This is a helper method for the public API.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
req*workflow.RecordActionRequestThe request containing the action details to record.

Returns

TypeDescription
*workflow.RecordActionResponseThe response indicating the outcome of the action recording.

recordSingleAction()

@classmethod
def recordSingleAction(
ctx: context.Context,
req: *workflow.RecordActionRequest
) - > error

Persists a single action's details to the data store. This method is an internal utility for recording individual actions.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
req*workflow.RecordActionRequestThe request containing the action details to record.

Returns

TypeDescription
errorAn error if the action could not be recorded.

UpdateActionStatus()

@classmethod
def UpdateActionStatus(
ctx: context.Context,
req: *connect.Request[workflow.UpdateActionStatusRequest]
) - > *connect.Response[workflow.UpdateActionStatusResponse], error

Updates the status of an existing action within a workflow run. This allows tracking the progress and outcome of actions.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.UpdateActionStatusRequest]The request containing the action identifier and the new status.

Returns

TypeDescription
*connect.Response[workflow.UpdateActionStatusResponse], errorA response indicating the success or failure of the status update, or an error if the operation failed.

UpdateActionStatusStream()

@classmethod
def UpdateActionStatusStream(
ctx: context.Context,
stream: *connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]
) - > error

Establishes a bidirectional stream to update the status of multiple actions. This enables real-time status synchronization for actions.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
stream*connect.BidiStream[workflow.UpdateActionStatusStreamRequest, workflow.UpdateActionStatusStreamResponse]The bidirectional stream for sending status update requests and receiving responses.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

updateActionStatus()

@classmethod
def updateActionStatus(
ctx: context.Context,
req: *workflow.UpdateActionStatusRequest
) - > *workflow.UpdateActionStatusResponse

Updates the status of a single action internally, processing the provided status update request. This is a helper method for the public API.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
req*workflow.UpdateActionStatusRequestThe request containing the action identifier and the new status.

Returns

TypeDescription
*workflow.UpdateActionStatusResponseThe response indicating the outcome of the action status update.

updateSingleActionStatus()

@classmethod
def updateSingleActionStatus(
ctx: context.Context,
req: *workflow.UpdateActionStatusRequest
) - > error

Persists the status update for a single action to the data store. This method is an internal utility for updating individual action statuses.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
req*workflow.UpdateActionStatusRequestThe request containing the action identifier and the new status.

Returns

TypeDescription
errorAn error if the action status could not be updated.

RecordActionEvents()

@classmethod
def RecordActionEvents(
ctx: context.Context,
req: *connect.Request[workflow.RecordActionEventsRequest]
) - > *connect.Response[workflow.RecordActionEventsResponse], error

Records a batch of events associated with actions. This allows for capturing detailed logs and state changes for actions.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.RecordActionEventsRequest]The request containing a list of action events to be recorded.

Returns

TypeDescription
*connect.Response[workflow.RecordActionEventsResponse], errorA response indicating the success or failure of recording the events, or an error if the operation failed.

RecordActionEventStream()

@classmethod
def RecordActionEventStream(
ctx: context.Context,
stream: *connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]
) - > error

Establishes a bidirectional stream to record multiple action events. This enables efficient, continuous logging of action-related occurrences.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
stream*connect.BidiStream[workflow.RecordActionEventStreamRequest, workflow.RecordActionEventStreamResponse]The bidirectional stream for sending action event recording requests and receiving responses.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

recordEvents()

@classmethod
def recordEvents(
ctx: context.Context,
events: []*workflow.ActionEvent
) - > error

Persists a list of action events to the data store. This method is an internal utility for recording event batches.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
events[]*workflow.ActionEventA slice of action events to be recorded.

Returns

TypeDescription
errorAn error if the events could not be recorded.

WatchGroups()

@classmethod
def WatchGroups(
ctx: context.Context,
req: *connect.Request[workflow.WatchGroupsRequest],
stream: *connect.ServerStream[workflow.WatchGroupsResponse]
) - > error

Establishes a server-side stream to watch for changes in task groups. This allows clients to receive real-time updates on group status and composition.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchGroupsRequest]The request specifying criteria for watching task groups.
stream*connect.ServerStream[workflow.WatchGroupsResponse]The server-side stream to send group updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

CreateRun()

@classmethod
def CreateRun(
ctx: context.Context,
req: *connect.Request[workflow.CreateRunRequest]
) - > *connect.Response[workflow.CreateRunResponse], error

Initiates a new workflow run based on the provided specifications. This method is the entry point for starting a workflow execution.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.CreateRunRequest]The request containing the specifications for the new workflow run.

Returns

TypeDescription
*connect.Response[workflow.CreateRunResponse], errorA response containing details of the newly created run, or an error if the run could not be created.

persistRunModel()

@classmethod
def persistRunModel(
ctx: context.Context,
runId: *common.RunIdentifier,
taskID: *task.TaskIdentifier,
taskSpec: *task.TaskSpec,
inputPrefix: string,
runOutputBase: string,
runSpec: *task.RunSpec,
source: workflow.RunSource,
triggerName: string,
triggerTaskName: string,
triggerRevision: int64,
triggerType: string
) - > *models.Run, error

Persists a new run model to the data store with all its associated metadata. This internal method is crucial for establishing a run's initial state.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
runId*common.RunIdentifierThe unique identifier for the run.
taskID*task.TaskIdentifierThe identifier for the task associated with the run.
taskSpec*task.TaskSpecThe specification of the task being executed.
inputPrefixstringThe prefix for input data paths.
runOutputBasestringThe base path for run output data.
runSpec*task.RunSpecThe specification for how the run should be executed.
sourceworkflow.RunSourceThe source or origin of the run.
triggerNamestringThe name of the trigger that initiated the run.
triggerTaskNamestringThe name of the task associated with the trigger.
triggerRevisionint64The revision number of the trigger.
triggerTypestringThe type of the trigger (e.g., 'manual', 'schedule').

Returns

TypeDescription
*models.Run, errorThe created run model, or an error if persistence failed.

AbortRun()

@classmethod
def AbortRun(
ctx: context.Context,
req: *connect.Request[workflow.AbortRunRequest]
) - > *connect.Response[workflow.AbortRunResponse], error

Aborts an active workflow run, stopping its execution and marking it as failed or cancelled. This is used to terminate runs prematurely.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.AbortRunRequest]The request containing the identifier of the run to abort.

Returns

TypeDescription
*connect.Response[workflow.AbortRunResponse], errorA response indicating the success or failure of the abort operation, or an error if the run could not be aborted.

GetRunDetails()

@classmethod
def GetRunDetails(
ctx: context.Context,
req: *connect.Request[workflow.GetRunDetailsRequest]
) - > *connect.Response[workflow.GetRunDetailsResponse], error

Fetches detailed information about a specific workflow run. This allows clients to inspect the state and metadata of a run.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.GetRunDetailsRequest]The request containing the identifier of the run to retrieve details for.

Returns

TypeDescription
*connect.Response[workflow.GetRunDetailsResponse], errorA response containing the run's details, or an error if the run is not found or the operation fails.

GetActionDetails()

@classmethod
def GetActionDetails(
ctx: context.Context,
req: *connect.Request[workflow.GetActionDetailsRequest]
) - > *connect.Response[workflow.GetActionDetailsResponse], error

Retrieves comprehensive details for a specific action within a workflow run. This provides insight into an action's execution and status.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.GetActionDetailsRequest]The request containing the identifier of the action to retrieve details for.

Returns

TypeDescription
*connect.Response[workflow.GetActionDetailsResponse], errorA response containing the action's details, or an error if the action is not found or the operation fails.

getActionDetails()

@classmethod
def getActionDetails(
ctx: context.Context,
actionId: *common.ActionIdentifier
) - > *workflow.ActionDetails, error

Fetches the detailed information for a specific action from the data store. This is an internal method used to construct action details.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
actionId*common.ActionIdentifierThe unique identifier of the action.

Returns

TypeDescription
*workflow.ActionDetails, errorThe detailed action information, or an error if the action is not found.

buildActionDetails()

@classmethod
def buildActionDetails(
ctx: context.Context,
model: *models.Action,
actionId: *common.ActionIdentifier
) - > *workflow.ActionDetails, error

Constructs a workflow.ActionDetails object from a models.Action and an ActionIdentifier. This helper method formats raw data into a structured response.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
model*models.ActionThe action model containing the raw data.
actionId*common.ActionIdentifierThe unique identifier for the action.

Returns

TypeDescription
*workflow.ActionDetails, errorThe constructed action details, or an error if building fails.

getAttempts()

@classmethod
def getAttempts(
ctx: context.Context,
actionId: *common.ActionIdentifier
) - > []*workflow.ActionAttempt, error

Retrieves all attempts associated with a given action. This is used to track retries and multiple executions of an action.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
actionId*common.ActionIdentifierThe unique identifier of the action.

Returns

TypeDescription
[]*workflow.ActionAttempt, errorA slice of action attempts, or an error if attempts cannot be retrieved.

GetActionData()

@classmethod
def GetActionData(
ctx: context.Context,
req: *connect.Request[workflow.GetActionDataRequest]
) - > *connect.Response[workflow.GetActionDataResponse], error

Fetches the data associated with a specific action, such as inputs, outputs, or logs. This allows clients to access the operational data of an action.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.GetActionDataRequest]The request containing the identifier of the action and the type of data to retrieve.

Returns

TypeDescription
*connect.Response[workflow.GetActionDataResponse], errorA response containing the action's data, or an error if the data is not found or the operation fails.

ListRuns()

@classmethod
def ListRuns(
ctx: context.Context,
req: *connect.Request[workflow.ListRunsRequest]
) - > *connect.Response[workflow.ListRunsResponse], error

Lists workflow runs based on specified filters and pagination criteria. This allows clients to query and browse available runs.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.ListRunsRequest]The request containing filters, sorting, and pagination parameters for listing runs.

Returns

TypeDescription
*connect.Response[workflow.ListRunsResponse], errorA response containing a list of runs matching the criteria, or an error if the listing fails.

ListActions()

@classmethod
def ListActions(
ctx: context.Context,
req: *connect.Request[workflow.ListActionsRequest]
) - > *connect.Response[workflow.ListActionsResponse], error

Lists actions within a specific workflow run or across runs, based on provided filters. This enables clients to inspect the actions that comprise a workflow.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.ListActionsRequest]The request containing filters, sorting, and pagination parameters for listing actions.

Returns

TypeDescription
*connect.Response[workflow.ListActionsResponse], errorA response containing a list of actions matching the criteria, or an error if the listing fails.

GetActionDataURIs()

@classmethod
def GetActionDataURIs(
ctx: context.Context,
req: *connect.Request[workflow.GetActionDataURIsRequest]
) - > *connect.Response[workflow.GetActionDataURIsResponse], error

Retrieves URIs for data associated with a specific action, such as input, output, or log locations. This allows clients to directly access action-related data.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.GetActionDataURIsRequest]The request containing the action identifier and the type of data URIs to retrieve.

Returns

TypeDescription
*connect.Response[workflow.GetActionDataURIsResponse], errorA response containing the URIs for the action's data, or an error if the URIs cannot be retrieved.

GetActionLogContext()

@classmethod
def GetActionLogContext(
ctx: context.Context,
req: *connect.Request[workflow.GetActionLogContextRequest]
) - > *connect.Response[workflow.GetActionLogContextResponse], error

Retrieves contextual information for an action's logs, such as log stream identifiers or access credentials. This is essential for accessing detailed action logs.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.GetActionLogContextRequest]The request containing the action identifier for which to retrieve log context.

Returns

TypeDescription
*connect.Response[workflow.GetActionLogContextResponse], errorA response containing the log context, or an error if the context cannot be retrieved.

AbortAction()

@classmethod
def AbortAction(
ctx: context.Context,
req: *connect.Request[workflow.AbortActionRequest]
) - > *connect.Response[workflow.AbortActionResponse], error

Aborts a specific action within a workflow run, stopping its execution. This allows for granular control over individual action lifecycles.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.AbortActionRequest]The request containing the identifier of the action to abort.

Returns

TypeDescription
*connect.Response[workflow.AbortActionResponse], errorA response indicating the success or failure of the abort operation, or an error if the action could not be aborted.

SignalEvent()

@classmethod
def SignalEvent(
ctx: context.Context,
_: *connect.Request[workflow.SignalEventRequest]
) - > *connect.Response[workflow.SignalEventResponse], error

Sends a signal event to a workflow run, potentially triggering specific actions or state transitions. This enables external interaction with running workflows.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
_*connect.Request[workflow.SignalEventRequest]The request containing the details of the signal event to be sent.

Returns

TypeDescription
*connect.Response[workflow.SignalEventResponse], errorA response indicating the success or failure of sending the signal, or an error if the operation fails.

WatchRunDetails()

@classmethod
def WatchRunDetails(
ctx: context.Context,
req: *connect.Request[workflow.WatchRunDetailsRequest],
stream: *connect.ServerStream[workflow.WatchRunDetailsResponse]
) - > error

Establishes a server-side stream to watch for real-time updates to a specific run's details. This allows clients to monitor run progress and status changes.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchRunDetailsRequest]The request specifying the run to watch.
stream*connect.ServerStream[workflow.WatchRunDetailsResponse]The server-side stream to send run detail updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

WatchActionDetails()

@classmethod
def WatchActionDetails(
ctx: context.Context,
req: *connect.Request[workflow.WatchActionDetailsRequest],
stream: *connect.ServerStream[workflow.WatchActionDetailsResponse]
) - > error

Establishes a server-side stream to watch for real-time updates to a specific action's details. This allows clients to monitor action progress and status changes.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchActionDetailsRequest]The request specifying the action to watch.
stream*connect.ServerStream[workflow.WatchActionDetailsResponse]The server-side stream to send action detail updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

WatchRuns()

@classmethod
def WatchRuns(
ctx: context.Context,
req: *connect.Request[workflow.WatchRunsRequest],
stream: *connect.ServerStream[workflow.WatchRunsResponse]
) - > error

Establishes a server-side stream to watch for changes and new workflow runs based on specified criteria. This allows clients to receive real-time notifications about run lifecycle events.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchRunsRequest]The request specifying filters for watching runs.
stream*connect.ServerStream[workflow.WatchRunsResponse]The server-side stream to send run updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

WatchActions()

@classmethod
def WatchActions(
ctx: context.Context,
req: *connect.Request[workflow.WatchActionsRequest],
stream: *connect.ServerStream[workflow.WatchActionsResponse]
) - > error

Establishes a server-side stream to watch for changes and new actions within workflow runs based on specified criteria. This allows clients to receive real-time notifications about action lifecycle events.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchActionsRequest]The request specifying filters for watching actions.
stream*connect.ServerStream[workflow.WatchActionsResponse]The server-side stream to send action updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

listAndSendAllActions()

@classmethod
def listAndSendAllActions(
ctx: context.Context,
runID: *common.RunIdentifier,
rsm: *runStateManager,
stream: *connect.ServerStream[workflow.WatchActionsResponse]
) - > error

Lists all actions for a given run and sends them over a server stream. This is typically used to initialize a client's view of actions for a run.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
runID*common.RunIdentifierThe unique identifier of the run.
rsm*runStateManagerThe run state manager used to access run data.
stream*connect.ServerStream[workflow.WatchActionsResponse]The server-side stream to send action updates to the client.

Returns

TypeDescription
errorAn error if listing or sending actions fails.

sendChangedActions()

@classmethod
def sendChangedActions(
runID: *common.RunIdentifier,
updates: []*nodeUpdate,
stream: *connect.ServerStream[workflow.WatchActionsResponse]
) - > error

Sends only the changed actions from a list of node updates over a server stream. This optimizes updates by only transmitting modified action states.

Parameters

NameTypeDescription
runID*common.RunIdentifierThe unique identifier of the run.
updates[]*nodeUpdateA slice of node updates containing information about changed actions.
stream*connect.ServerStream[workflow.WatchActionsResponse]The server-side stream to send action updates to the client.

Returns

TypeDescription
errorAn error if sending changed actions fails.

WatchClusterEvents()

@classmethod
def WatchClusterEvents(
ctx: context.Context,
req: *connect.Request[workflow.WatchClusterEventsRequest],
stream: *connect.ServerStream[workflow.WatchClusterEventsResponse]
) - > error

Establishes a server-side stream to watch for cluster-related events. This allows clients to monitor infrastructure events relevant to workflow execution.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
req*connect.Request[workflow.WatchClusterEventsRequest]The request specifying criteria for watching cluster events.
stream*connect.ServerStream[workflow.WatchClusterEventsResponse]The server-side stream to send cluster event updates to the client.

Returns

TypeDescription
errorAn error if the stream operation encounters an issue.

getClusterEventsInfo()

@classmethod
def getClusterEventsInfo(
ctx: context.Context,
actionID: *common.ActionIdentifier,
attempt: uint32,
since: time.Time,
offset: int,
limit: int
) - > (clusterEventsInfo, error)

Retrieves information about cluster events for a specific action attempt, optionally filtered by time, offset, and limit. This is used to gather diagnostic data.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
actionID*common.ActionIdentifierThe unique identifier of the action.
attemptuint32The specific attempt number of the action.
sincetime.TimeThe timestamp from which to retrieve events.
offsetintThe starting offset for event retrieval.
limitintThe maximum number of events to retrieve.

Returns

TypeDescription
(clusterEventsInfo, error)A structure containing cluster event information, or an error if retrieval fails.

actionModelToDetails()

@classmethod
def actionModelToDetails(
action: *models.Action,
actionID: *common.ActionIdentifier
) - > *workflow.ActionDetails

Converts an internal models.Action object into a workflow.ActionDetails protobuf message. This facilitates consistent data representation for API responses.

Parameters

NameTypeDescription
action*models.ActionThe internal action model to convert.
actionID*common.ActionIdentifierThe unique identifier for the action.

Returns

TypeDescription
*workflow.ActionDetailsThe converted workflow.ActionDetails message.

convertRunToProto()

@classmethod
def convertRunToProto(
run: *models.Run
) - > *workflow.Run

Converts an internal models.Run object into a workflow.Run protobuf message. This standardizes the run data for external consumption.

Parameters

NameTypeDescription
run*models.RunThe internal run model to convert.

Returns

TypeDescription
*workflow.RunThe converted workflow.Run protobuf message.

convertActionToEnrichedProto()

@classmethod
def convertActionToEnrichedProto(
action: *models.Action
) - > *workflow.EnrichedAction

Converts an internal models.Action object into an workflow.EnrichedAction protobuf message. This provides a more detailed view of an action for API responses.

Parameters

NameTypeDescription
action*models.ActionThe internal action model to convert.

Returns

TypeDescription
*workflow.EnrichedActionThe converted workflow.EnrichedAction protobuf message.

convertNodeUpdateToEnrichedProto()

@classmethod
def convertNodeUpdateToEnrichedProto(
runID: *common.RunIdentifier,
update: *nodeUpdate
) - > *workflow.EnrichedAction

Converts a nodeUpdate object into an workflow.EnrichedAction protobuf message, associating it with a specific run. This is used to format action updates for streaming.

Parameters

NameTypeDescription
runID*common.RunIdentifierThe unique identifier of the run to which the action belongs.
update*nodeUpdateThe node update containing information about the action change.

Returns

TypeDescription
*workflow.EnrichedActionThe converted workflow.EnrichedAction protobuf message.

buildTaskGroups()

@classmethod
def buildTaskGroups(
ctx: context.Context,
req: *workflow.WatchGroupsRequest
) - > []*workflow.TaskGroup, error

Builds a list of task groups based on a watch request. This organizes tasks into logical groups for display or processing.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request.
req*workflow.WatchGroupsRequestThe request containing criteria for building task groups.

Returns

TypeDescription
[]*workflow.TaskGroup, errorA slice of task groups, or an error if group building fails.

convertWatchRequestToListInput()

@classmethod
def convertWatchRequestToListInput(
req: *workflow.WatchRunsRequest
) - > interfaces.ListResourceInput

Converts a workflow.WatchRunsRequest into an interfaces.ListResourceInput for internal data store querying. This adapts watch requests to a generic listing interface.

Parameters

NameTypeDescription
req*workflow.WatchRunsRequestThe watch runs request to convert.

Returns

TypeDescription
interfaces.ListResourceInputThe converted list resource input.

runMatchesFilter()

@classmethod
def runMatchesFilter(
run: *models.Run,
req: *workflow.WatchRunsRequest
) - > bool

Checks if a given run matches the filters specified in a workflow.WatchRunsRequest. This is used to determine which runs should be included in watch streams.

Parameters

NameTypeDescription
run*models.RunThe run model to check against the filter.
req*workflow.WatchRunsRequestThe watch runs request containing the filter criteria.

Returns

TypeDescription
boolTrue if the run matches the filter, false otherwise.