Associate label to compute environment

Hi, do anyone knows how to show the computing environment in the Runs page? I would like be able to see where the pipelines are running.

A solution may be to associate a label to the computing environment, by it doesn’t seems to be possible yet.

This is necessary to choose the best environment where to run new pipelines.

There are icons related to the compute environment type (AWS, Azure, etc), but if you want something referring to a specific compute environment, it seems to me you’re left with labels as the only solution.

1 Like

Hi Marcel, labels are fine, the question is how can we associate it automatically? We don’t want the user to repeat twice the selection (for the environment and for the label)

This is currently not supported. The labels that we have for compute environments are resource labels and these are automatically carried over to resource labels in the runs using such compute environments. But the runs labels are a different thing, and it’s not supported to have them auto-copy the compute environment resource labels, or to show the resource labels in the runs page.

UPDATE: I think you can do it through the API, though.

Step 1: Get the labelIds prior to setting up the compute environment:

curl $TOWER_API_ENDPOINT/workflow/labels?workspaceId=$TOWER_WORKSPACE_ID \
 -H "Accept: application/json" \
 -H "Authorization: Bearer $TOWER_ACCESS_TOKEN"

Step 2: Add the following to the post-run script when creating the compute environment. Update the labelIds with the ID from Step 1. Multiple labelIds can be added.

curl $TOWER_API_ENDPOINT/workflow/labels/apply?workspaceId=$TOWER_WORKSPACE_ID \
  -H "Authorization: Bearer $TOWER_ACCESS_TOKEN" \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Content-Type: application/json' \
  --data-raw "{\"labelIds\":[194148761556026,15512313452694],\"workflowIds\":[\"${TOWER_WORKFLOW_ID}\"]}"

Hi Arnaud,

I took the liberty of creating a feature request on your behalf for this:

Warm regards,
Rob

1 Like

thanks!

1 Like