Skip to content

Make API Gateway integ test's deleteRestApi more reliable & best-effort #3083

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

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

Bennett-Lynch
Copy link
Contributor

License

  • I confirm that this pull request can be released under the Apache 2 license

@Bennett-Lynch Bennett-Lynch requested a review from a team as a code owner March 7, 2022 20:13
DELETE_RATE_LIMITER.getValue().acquire();
try {
apiGateway.deleteRestApi(DeleteRestApiRequest.builder().restApiId(restApiId).build());
} catch (Exception e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Query : Why aren't we catching just the specific exception TooManyRequestsException here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to catch any potential transient failure (TooManyRequestsException, 500, 503, etc.) and not ever fail the tests on those occurring. But I agree it could be potentially dangerous to catch something like a 400.

I'll assume that most transient failures will be covered by retries and change this to just catch TooManyRequestsException.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you

@Bennett-Lynch Bennett-Lynch enabled auto-merge (squash) March 7, 2022 20:56
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Bennett-Lynch Bennett-Lynch merged commit 2fafa08 into aws:master Mar 7, 2022
aws-sdk-java-automation added a commit that referenced this pull request Jun 20, 2024
…e942cb256

Pull request: release <- staging/5f8bcdb1-da45-49cf-ac7f-419e942cb256
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