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

Add overwrite option when importing pipelines and ces #333

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

JaimeSeqLabs
Copy link
Contributor

Description

Adds '--overwrite' flag to pipeline and CE import commands.
If the flag is set the resource is deleted before importing the data.

Closes #285

Guidelines for testing

tw compute-envs import --overwrite -n TestCE import_data.json

tw pipelines import --overwrite -n TestPipeline import_data.json

@drpatelh
Copy link
Member

Thanks @JaimeSeqLabs ! Would it be possible to extend the scope of this PR to --overwrite any entity in Tower? This is particularly useful in automation scenarios where you want to re-run a script and not have to delete everything individually.

For example, if you search for overwrite in this file you can see it is possible to set it for any entity and not just Pipelines / CEs as requested in the linked issue.
https://github.com/seqeralabs/twkit/blob/661f4e12ecd86fbc54414a26456fbbacff4b773a/examples/yaml/twkit-e2e.yml#L7

Having this functionality in the CLI will mean we can remove the customisation we are using in twkit.

Thanks!

@JaimeSeqLabs
Copy link
Contributor Author

Hi @drpatelh
Yes, it is possible to support --overwrite for more entities, but each one needs to be deleted and re-created explicitly in code, there is not a common approach to it.
I would prefer creating another issue for supporting the rest of the entities just to keep things tidy.

@JaimeSeqLabs
Copy link
Contributor Author

See #338 for the aggregated list

@JaimeSeqLabs JaimeSeqLabs merged commit 2893bdb into master Sep 21, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

Add --overwrite option when importing pipelines and CEs
5 participants