Skip to main content

resourceLabels

The resourceLabels directive attaches custom name-value pairs to task executions, for executors that support it.

Usage

For example:

process hello {
resourceLabels region: 'some-region', user: 'some-username'

script:
"""
your_command --here
"""
}

Resource labels are attached to underlying resources such as cloud VMs, and are intended for operational purposes such as cost tracking. They are not recorded in lineage metadata.

When resourceLabels is specified multiple times in the config, only the last setting is used. Additionally, when resourceLabels is specified both in the config and the process definition, only the process definition is used.

As a best practice, define all resource labels in a single config setting:

process {
resourceLabels = [ region: 'some-region', user: 'some-username' ]
}

Use process selectors (withName: or withLabel:) to override resource labels for a specific process.

Executor support

Resource labels are supported by the following executors:

Consider the limits and syntax of the corresponding executor when using resource labels.

Added in version 23.10

Resource labels in Azure are added to auto-pools, rather than jobs, to support cost analysis. A new pool is created for each new set of resource labels. Setting azure.batch.deletePoolsOnCompletion = true is recommended when using process-specific resource labels.

See also

  • label (for shared process configuration)
  • tag (for per-task identification)