Add resource label support for CE export/import
Closed this issue · 2 comments
ejseqera commented
- Given a compute environment with a resource label
owner:esha
as such:
$ tw -o json compute-envs view -n seqera_gcp_london_with_fusionV2 -w scidev/gcp
{
"id" : "[redacted]",
"name" : "seqera_gcp_london_with_fusionV2",
"platform" : "google-batch",
"config" : {
"location" : "europe-west2",
"workDir" : "gs://seqeralabs-showcase",
"spot" : true,
"bootDiskSizeGb" : 200,
"projectId" : "seqera-labs-showcase",
"sshDaemon" : false,
"usePrivateAddress" : false,
"environment" : [ ],
"discriminator" : "google-batch"
},
....
"labels" : [ {
"id" : 119189842957132,
"name" : "owner",
"value" : "esha",
"resource" : true
} ]
}
- The resource label is not included in the json output for the CE upon export:
$ tw compute-envs export seqera_gcp_london_with_fusionV2.json -n seqera_gcp_london_with_fusionV2 -w scidev/gcp
$ cat seqera_gcp_london_with_fusionV2.json
{
"location" : "europe-west2",
"workDir" : "gs://seqeralabs-showcase",
"spot" : true,
"bootDiskSizeGb" : 200,
"projectId" : "seqera-labs-showcase",
"sshDaemon" : false,
"usePrivateAddress" : false,
"environment" : [ ],
"discriminator" : "google-batch"
}
This prevents the creation of CEs using with resource labels via the Tower CLI using tw import
. I don't think CEs can be updated via CLI/UI to add a resource label either.
Versions:
Tower API version | 1.19.0
Tower version | 23.2.0-cycle12
CLI version | 0.8.0 (3582751)
CLI minimum API version | 1.15
jordeu commented
The problem of exporting/importing labels is that they are using internal IDs.
What should happen if you export in one workspace and import in a different one? The label should automatically be created and attached?
jordeu commented
Do we agree that the label should be automatically created at the new workspace?