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

[Bug] Cleanup deployment fix for paginated list stacks #1111

Merged

Conversation

lewijacn
Copy link
Collaborator

Description

Bug fix for cleanup deployment to properly handle CFN list stacks giving paginated response

Issues Resolved

None created

Is this a backport? If so, please add backport PR # and/or commits #

Testing

Local testing

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.84%. Comparing base (e526ae0) to head (c320de8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1111      +/-   ##
============================================
- Coverage     80.55%   78.84%   -1.71%     
  Complexity     2930     2930              
============================================
  Files           390      358      -32     
  Lines         14462    12310    -2152     
  Branches        998      998              
============================================
- Hits          11650     9706    -1944     
+ Misses         2209     2001     -208     
  Partials        603      603              
Flag Coverage Δ
gradle-test 78.63% <ø> (ø)
python-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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

@lewijacn lewijacn merged commit 746f24b into opensearch-project:main Oct 30, 2024
14 of 15 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.

2 participants