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 Cloudformation waiter to delete operation #811

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

gcasilva
Copy link
Contributor

@gcasilva gcasilva commented Sep 6, 2023

Overview

Includes Cloudformation waiter for the delete operation. This is needed when we have a use-case to deploy sequential executions of Taskcat that leverages same set of resources as this could cause conflicts.
This is explained in this Issue: #809

Testing/Steps taken to ensure quality

Tested successfully Taskcat sequential deployment using this forked version

Notes

Optional. Caveats, Alternatives, Other relevant information.

Testing Instructions

How to test this PR Start after checking out this branch (bulleted)

  • Include test case, and expected output
  • Test Taskcat sequential run with a Taskcat test clean in between.

@gattasrikanth
Copy link

Do you think an extra flag is needed to wait? For our usecase this is perfect without any flags. Right now we trigger a clean, a custom script wait for all the stacks tobe deleted and then run clean up resources to delete any leftover s3buckets/dynamodb etc.

But what if someone wants to just trigger the delete taskact test clean project_name and move on to next steps in the CI/CD without having to wait for the stacks tobe deleted completely in all regions. It might be a deal breaker for such usecases.

I guess something like this will be useful. taskcat test clean project_name --wait-for-stacks-delete

Any thoughts?

@gcasilva
Copy link
Contributor Author

gcasilva commented Sep 6, 2023

@gattasrikanth That's a good point, will work on modifying this implementation so user can send it as a parameter like you suggested: taskcat test clean project_name --wait-for-stacks-delete

@andrew-glenn
Copy link
Collaborator

@gcasilva Thank you so much for this PR; I'm flipping it to draft while you add the flag; flip it to "ready" when you're... ready :)

…ormation deletion completion before proceeding
@gcasilva
Copy link
Contributor Author

@andrew-glenn @gattasrikanth made the change to last commit so that if user does not add argument -w or --wait-for-delete on test clean it will behave as is today (without waiting for cloudformation deletion to complete), but if they add the argument -w then taskcat will wait for cloudformation deletion to complete before proceeding.
Tested successfully here.
Can you please review it?

Copy link

@gattasrikanth gattasrikanth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@andrew-glenn andrew-glenn merged commit 6472b41 into aws-ia:main Sep 20, 2023
1 check was pending
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.

5 participants