Skip to main content

GetExecutionEnvVars

Generates a list of environment variables relevant to a Flyte task execution, including execution-level and task definition-level details. It constructs environment variables such as execution ID, project, domain, attempt number, and optionally a console URL, along with task-specific identifiers.

def GetExecutionEnvVars(
id: pluginsCore.TaskExecutionID,
consoleURL: string
) - > []v1.EnvVar

Generates a list of environment variables relevant to a Flyte task execution. This function provides crucial context about the execution, project, domain, and task details, which can be used by tasks running within the Flyte platform.

Parameters

NameTypeDescription
idpluginsCore.TaskExecutionIDThe unique identifier for the task execution, containing details about the node execution, project, domain, and task.
consoleURLstringThe base URL of the Flyte console. If provided and not empty, an environment variable for the Flyte execution URL will be included.

Returns

TypeDescription
[]v1.EnvVarA slice of v1.EnvVar objects, each representing an environment variable with its name and value or value source. Returns an empty slice if the provided execution ID is incomplete.