Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--delete flag not working as expected #115

Closed
max-l-weaver opened this issue Feb 12, 2024 · 3 comments
Closed

--delete flag not working as expected #115

max-l-weaver opened this issue Feb 12, 2024 · 3 comments
Assignees
Milestone

Comments

@max-l-weaver
Copy link

I have the following yaml I'm passing into seqerakit:

workspaces:
  - name: test-workspace
    description: Test for Max/Terraform
    full-name: Test Workspace
    organization: <redacted>
    visibility: PRIVATE

It works as expected when running seqerakit ./path/to/yaml.yml however when I pass in the delete flag I get the following output:

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

DEBUG:root: Running command: tw -o json workspaces list
INFO:root:Checking if workspaceId test-workspace exists in Seqera Platform...

I've run the tw -o json workspaces list myself to see if my workspace is definitely there, which it is:

$ tw -o json workspaces list | jq -r '.workspaces[].workspaceName' | grep test-workspace
test-workspace

and nothing. I've tried running the -l DEBUG flag in to see if there's further info but it returns no additional information.

Running latest version (which is the only one available)

@ejseqera ejseqera self-assigned this Feb 16, 2024
@ejseqera
Copy link
Member

ejseqera commented Feb 16, 2024

Thanks for reporting - will take a look at this and reproduce on my end. Does the --delete flag work for you with other objects (i.e. pipelines, datasets)?

@ejseqera ejseqera added this to the v0.4.6 milestone Feb 16, 2024
@max-l-weaver
Copy link
Author

@ejseqera unfortunately I haven't tested those as we currently don't need to delete any other resources. Please let me know if you want me to do any further testing/diagnostics

@ejseqera
Copy link
Member

ejseqera commented Mar 4, 2024

This is fixed by #119

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

@ejseqera ejseqera closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants