Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/cleanupDeployment/cleanup_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def delete_stacks_for_environment(stage_name: str):
next_stack_names = [stack['StackName'] for stack in next_list_stacks_response['StackSummaries']
if stack['StackStatus'] not in CFN_INITIAL_STATUS_SKIP]
stack_names.extend(next_stack_names)
list_stacks_response.get("NextToken", None)
next_token = next_list_stacks_response.get("NextToken", None)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: switch to do {} while pattern to prevent this kind of bug in the future


stage_stack_names = []
for name in stack_names:
Expand All @@ -151,6 +151,7 @@ def delete_stacks_for_environment(stage_name: str):


def main():
logging.info("Starting cleanup deployment process")
parser = argparse.ArgumentParser(description="Cleanup an opensearch-migrations deployment environment.")
parser.add_argument("--stage", type=str, help="The deployment stage environment to delete")
args = parser.parse_args()
Expand Down