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 various components like task readers, input/output handlers, and metadata, which are essential for executing a task within the Flyte system.
Parameters
| Name | Type | Description |
|---|---|---|
| taskAction | *flyteorgv1.TaskAction | The TaskAction object containing the task's specification and current status. |
| dataStore | *storage.DataStore | The data store client used for reading and writing task inputs and outputs. |
| pluginStateMgr | *PluginStateManager | The plugin state manager responsible for managing the state of task plugins. |
| secretManager | pluginsCore.SecretManager | The secret manager used to access and manage secrets required by the task. |
| resourceManager | pluginsCore.ResourceManager | The resource manager for handling and allocating resources needed by the task. |
| catalogClient | catalog.AsyncClient | The asynchronous catalog client for interacting with the Flyte catalog service. |
Returns
| Type | Description |
|---|---|
*taskExecutionContext, error | A new TaskExecutionContext object or an error if initialization fails. |