tower-cli icon indicating copy to clipboard operation
tower-cli copied to clipboard

ERROR: A label with name 'x' already exists for workspace 'Altos_Labs_Inc'

Open millerh1 opened this issue 1 year ago • 1 comments

Whenever I am attempting to run something like the following:

tw launch FetchNGS_NFcore --params-file fetchngs/fetchngs_tower_params.3.json --config ../src/fetchngs_nextflow.config --compute-env xyz --labels x,y

I get this error:

ERROR: A label with name 'x' already exists for workspace 'Altos_Labs_Inc'

Is there a way to label these pipeline runs even if the label already exists? From the tower GUI, this is possible.

millerh1 avatar Apr 04 '24 22:04 millerh1

Further Details on the Issue

The user is utilizing the Seqera Platform, and the following insights were provided by Tomas:

After reviewing the tower-cli output provided by the user, it appears that the CLI initially checks for the existence of any labels to attach within the workspace by making a GET ... /api/labels call. However, it only retrieves the first page of 10 labels, while there are actually 75 labels in total. Consequently, if the label being sought isn't present on that initial page, the CLI assumes it doesn't exist and proceeds to attempt creation (POST ... /api/labels call), leading to a name uniqueness error. This issue needs to be addressed on the CLI side.

Upon replicating the error, I was able to confirm that Tomas's hypothesis regarding the labels is accurate. There are approximately 26 labels, causing the UI to generate a new page.

Error Screenshot

Shahzebs-MacBook-Pro:scripts shahzeb.mahmood$ tw launch hello_test --labels test9

ERROR: A label with the name 'test9' already exists for the workspace 'Shared_test_2'.

3 < X-Frame-Options: SAMEORIGIN
3 < X-Permitted-Cross-Domain-Policies: none
3 < X-XSS-Protection: 1; mode=block
{"labels":[{"id":182880823818973,"name":"test1","value":null,"resource":false,"isDefault":false},{"id":12041303254124,"name":"test10","value":null,"resource":false,"isDefault":false},{"id":39318388957374,"name":"test11","value":null,"resource":false,"isDefault":false},{"id":221098703983065,"name":"test12","value":null,"resource":false,"isDefault":false},{"id":36032815253439,"name":"test13","value":null,"resource":false,"isDefault":false},{"id":232834630226900,"name":"test14","value":null,"resource":false,"isDefault":false},{"id":157124631438898,"name":"test15","value":null,"resource":false,"isDefault":false},{"id":12731207517792,"name":"test16","value":null,"resource":false,"isDefault":false},{"id":177574939307660,"name":"test17","value":null,"resource":false,"isDefault":false},{"id":69108272361841,"name":"test18","value":null,"resource":false,"isDefault":false}],"totalSize":26}

4 < Content-Type: application/json
4 < Date: Fri, 12 Apr 2024 13:45:33 GMT
4 < Server: nginx
4 < X-Content-Type-Options: nosniff
4 < X-Frame-Options: SAMEORIGIN
4 < X-XSS-Protection: 1; mode=block
{"message":"A label with name 'test9' already exists for workspace 'Shared_test_2'"}


 ERROR: A label with name 'test9' already exists for workspace 'Shared_test_2'

ShahzebMahmood avatar Apr 11 '24 19:04 ShahzebMahmood

Quick update, a fix for this was merged: https://github.com/seqeralabs/platform/pull/6982

endre-seqera avatar May 09 '24 09:05 endre-seqera

I'm still getting this error. Do I need to ask our IT folks to update something for tower?

Best, Henry

On Thu, May 9, 2024 at 2:36 AM Endre Sükösd @.***> wrote:

Quick update, a fix for this was merged: seqeralabs/platform#6982 https://github.com/seqeralabs/platform/pull/6982

— Reply to this email directly, view it on GitHub https://github.com/seqeralabs/tower-cli/issues/397#issuecomment-2102308246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKV4346W72362M7SPMHKECDZBM7STAVCNFSM6AAAAABFYD6VJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGMYDQMRUGY . You are receiving this because you authored the thread.Message ID: @.***>

millerh1 avatar May 13 '24 23:05 millerh1

Hey, @millerh1 I have sent you a response regarding the above question on the FD ticket.

ShahzebMahmood avatar May 14 '24 13:05 ShahzebMahmood

Thanks! Looks like we need to wait for the next enterprise release. Closing now!

millerh1 avatar May 14 '24 14:05 millerh1