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

Terminates when workspace is already defined #168

Open
multimeric opened this issue Oct 9, 2024 · 2 comments
Open

Terminates when workspace is already defined #168

multimeric opened this issue Oct 9, 2024 · 2 comments

Comments

@multimeric
Copy link

If I have an infrastructure.yml with the following contents:

workspaces:
  - name: MyWorkspace
    full-name: My Workspace
    organization: MyOrg
...

Then the second time I run seqera-kit, it gives me:

INFO:root: Running command: tw -o json workspaces list -o WEHI
INFO:root: Checking if workspaceName MyWorkspace exists in Seqera Platform...
ERROR:root: The workspaces resource already exists and will not be created. Please set 'overwrite: True' in your config file.```

I'm surprised it throws an error here, because I thought the purpose of seqera-kit was to skip existing resources? The reason why this matters is that it will terminate after this error and not create the other resources I'm trying to define.

@ejseqera ejseqera added this to the v0.5.0 milestone Dec 3, 2024
@ejseqera
Copy link
Member

ejseqera commented Dec 9, 2024

I am unable to reproduce this error. Are you able to try with v0.4.9?

For example, with a YAML file as follows:

workspaces:
  - name: 'seqerakit-test'
    organization: 'scidev'
    full-name: 'seqerakit-test'
    overwrite: True

Testing:

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

INFO:root: Running command: tw workspaces delete --id 31815709498502
INFO:root: Command output: Workspace 'seqerakit-test' deleted for scidev organization
Workspace 'seqerakit-test' deleted for scidev organization
INFO:root: Running command: tw workspaces add --name seqerakit-test --organization scidev --full-name seqerakit-test
INFO:root: Command output: A 'PRIVATE' workspace 'seqerakit-test' added for 'scidev' organization
A 'PRIVATE' workspace 'seqerakit-test' added for 'scidev' organization

@ejseqera ejseqera removed this from the v0.5.0 milestone Dec 9, 2024
@multimeric
Copy link
Author

I think the problem is that I didn't have overwrite: True because I didn't want to overwrite. If the workspace already existed, I wanted it to just skip it and continue by populating it with pipelines etc.

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