Skip to content

Commit

Permalink
Update docs and unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Aug 15, 2023
1 parent 92296f4 commit ca8441f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2124,12 +2124,15 @@ The limits and the syntax of the corresponding cloud provider should be taken in
Resource labels are currently supported by the following executors:

- {ref}`awsbatch-executor`
- {ref}`google-lifesciences-executor`
- {ref}`azurebatch-executor`
- {ref}`google-batch-executor`
- {ref}`google-lifesciences-executor`
- {ref}`k8s-executor`

:::{versionadded} 23.09.0-edge
Resource labels are supported for {ref}`azurebatch-executor`. However, because cost analysis in Azure is tied to pools, resource labels are applied to pools rather than jobs. Therefore, when using Azure Batch it is recommended that you define resource labels once for all processes, as each pool will use the resource labels of the first process that creates it.
Resource labels are supported for Azure Batch when using automatic pool creation.

Resource labels in Azure are added to pools, rather than jobs, in order to facilitate cost analysis. A new pool will be created for each new set of resource labels, therefore it is recommended to also set `azure.batch.deletePoolsOnCompletion = true` when using process-specific resource labels.
:::

See also: [label](#label)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class AzBatchServiceTest extends Specification {
getMemory() >> MEM
getCpus() >> CPUS
getMachineType() >> TYPE
getResourceLabels() >> [foo: 'bar']
}
}

Expand All @@ -346,7 +347,8 @@ class AzBatchServiceTest extends Specification {
then:
1 * svc.guessBestVm(LOC, CPUS, MEM, TYPE) >> VM
and:
spec.poolId == 'nf-pool-ddb1223ab79edfe07c0af2be7fceeb13-Standard_X1'
spec.poolId == 'nf-pool-9022a3fbfb5f93028d78fefaea5e21ab-Standard_X1'
spec.metadata == [foo: 'bar']

}

Expand Down

0 comments on commit ca8441f

Please sign in to comment.