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

r/aws_apigatewayv2: additional ConflictException retry logic #40840

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jan 8, 2025

Description

This change adds an additional step to the apigatewayv2 service client retry logic to check for ConflictException error responses based solely on the message content. This is intended to address cases where the error is not serialized into the higher level types.ConflictException defined as the service package level (which the existing logic expects). Local testing of the configuration provided in the linked issue confirmed this additional logic prevents the intermittent failures observed during destruction of large numbers of routes in parallel.

Relations

Closes #40575

References

Output from Acceptance Testing

% make testacc PKG=apigatewayv2 TESTS=TestAccAPIGatewayV2Route_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/apigatewayv2/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayV2Route_'  -timeout 360m
2025/01/08 15:06:20 Initializing Terraform AWS Provider...

--- PASS: TestAccAPIGatewayV2Route_disappears (17.18s)
--- PASS: TestAccAPIGatewayV2Route_basic (18.81s)
--- PASS: TestAccAPIGatewayV2Route_target (19.62s)
--- PASS: TestAccAPIGatewayV2Route_model (19.76s)
--- PASS: TestAccAPIGatewayV2Route_updateRouteKey (27.79s)
--- PASS: TestAccAPIGatewayV2Route_requestParameters (36.06s)
--- PASS: TestAccAPIGatewayV2Route_simpleAttributes (36.27s)
--- PASS: TestAccAPIGatewayV2Route_authorizer (53.29s)
--- PASS: TestAccAPIGatewayV2Route_jwtAuthorization (53.34s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigatewayv2       59.735s

Copy link

github-actions bot commented Jan 8, 2025

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Jan 8, 2025
@jar-b jar-b added the bug Addresses a defect in current functionality. label Jan 8, 2025
This change adds an additional step to the `apigatewayv2` service client retry logic to check for `ConflictException` error responses based solely on the message content. This is intended to address cases where the error is not serialized into the higher level `types.ConflictException` defined as the service package level (which the existing logic expects). Local testing of the configuration provided in the linked issue confirmed this additional logic prevents the intermittent failures observed during destruction of large numbers of routes in parallel.

```console
% make testacc PKG=apigatewayv2 TESTS=TestAccAPIGatewayV2Route_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/apigatewayv2/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayV2Route_'  -timeout 360m
2025/01/08 15:06:20 Initializing Terraform AWS Provider...

--- PASS: TestAccAPIGatewayV2Route_disappears (17.18s)
--- PASS: TestAccAPIGatewayV2Route_basic (18.81s)
--- PASS: TestAccAPIGatewayV2Route_target (19.62s)
--- PASS: TestAccAPIGatewayV2Route_model (19.76s)
--- PASS: TestAccAPIGatewayV2Route_updateRouteKey (27.79s)
--- PASS: TestAccAPIGatewayV2Route_requestParameters (36.06s)
--- PASS: TestAccAPIGatewayV2Route_simpleAttributes (36.27s)
--- PASS: TestAccAPIGatewayV2Route_authorizer (53.29s)
--- PASS: TestAccAPIGatewayV2Route_jwtAuthorization (53.34s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigatewayv2       59.735s
```
@jar-b jar-b force-pushed the b-apigatewayv2-client-retries branch from c60c7cd to d982ad6 Compare January 8, 2025 20:20
@jar-b jar-b added the regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. label Jan 8, 2025
@jar-b jar-b marked this pull request as ready for review January 8, 2025 21:46
@jar-b jar-b requested a review from a team as a code owner January 8, 2025 21:46
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

@jar-b jar-b merged commit 19b0f39 into main Jan 9, 2025
47 checks passed
@jar-b jar-b deleted the b-apigatewayv2-client-retries branch January 9, 2025 14:22
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 9, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service.
Projects
None yet
2 participants