seqeralabs / seqera-kit

Python implementation and field-tool for automated pipeline launching through Tower CLI (beta)
Apache License 2.0
25 stars 6 forks source link

fix: fix delete/overwrite bug with workspaces #119

Closed ejseqera closed 8 months ago

ejseqera commented 8 months ago

Re #115

Fixes bug in keys used to retrieve identifier for workspaces and retrieving ID for workspace for deletion.

Confirmed by adding a workspace:

DEBUG:root: Running command: tw -o json workspaces list
INFO:root:Checking if workspaceName e2e_demo exists in Seqera Platform...
DEBUG:root: Running command: tw workspaces add --name e2e_demo --full-name 'some name' --organization seqerakit_automation --visibility PRIVATE

Followed by deleting:

DEBUG:root: The '--delete' flag has been specified.

DEBUG:root: Running command: tw -o json workspaces list
INFO:root:Checking if workspaceName e2e_demo exists in Seqera Platform...
DEBUG:root: Deleting the workspaces resource.
DEBUG:root: Running command: tw workspaces delete --id 232421996273149

Also by specifying overwrite: true with an existing workspace of same name:

DEBUG:root: Overwrite is set to 'True' for workspaces

DEBUG:root: Running command: tw -o json workspaces list
INFO:root:Checking if workspaceName e2e_demo exists in Seqera Platform...
DEBUG:root: The attempted workspaces resource already exists. Overwriting.

DEBUG:root: Running command: tw workspaces delete --id 183701661549877
DEBUG:root: Running command: tw workspaces add --name e2e_demo --full-name 'some name' --organization seqerakit_automation --visibility PRIVATE