Skip to main content

NewTaskExecutionContext

NewTaskExecutionContext creates a TaskExecutionContext from a TaskAction and supporting dependencies.

def NewTaskExecutionContext(
taskAction: *flyteorgv1.TaskAction,
dataStore: *storage.DataStore,
pluginStateMgr: *PluginStateManager,
secretManager: pluginsCore.SecretManager,
resourceManager: pluginsCore.ResourceManager,
catalogClient: catalog.AsyncClient
) - > (*taskExecutionContext, error)

Creates a TaskExecutionContext from a TaskAction and supporting dependencies. This function initializes all necessary components like task readers, input/output handlers, and metadata for task execution.

Parameters

NameTypeDescription
taskAction*flyteorgv1.TaskActionThe TaskAction object containing the task specification and current status.
dataStore*storage.DataStoreThe data store client used for reading and writing task inputs and outputs.
pluginStateMgr*PluginStateManagerThe plugin state manager for handling plugin-specific state.
secretManagerpluginsCore.SecretManagerThe secret manager for accessing sensitive information required by the task.
resourceManagerpluginsCore.ResourceManagerThe resource manager for handling task-related resources.
catalogClientcatalog.AsyncClientThe catalog client for interacting with the catalog service.

Returns

TypeDescription
(*taskExecutionContext, error)A new TaskExecutionContext instance or an error if initialization fails.