-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
fix: apigatewayv2 error handling for ConflictException: Unable to complete operation due to concurrent modification. #29735
fix: apigatewayv2 error handling for ConflictException: Unable to complete operation due to concurrent modification. #29735
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @zjalicf-cyberlab 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccAPIGatewayV2Integration_\|TestAccAPIGatewayV2Route_' PKG=apigatewayv2 ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/apigatewayv2/... -v -count 1 -parallel 5 -run=TestAccAPIGatewayV2Integration_\|TestAccAPIGatewayV2Route_ -timeout 180m
=== RUN TestAccAPIGatewayV2Integration_basicWebSocket
=== PAUSE TestAccAPIGatewayV2Integration_basicWebSocket
=== RUN TestAccAPIGatewayV2Integration_basicHTTP
=== PAUSE TestAccAPIGatewayV2Integration_basicHTTP
=== RUN TestAccAPIGatewayV2Integration_disappears
=== PAUSE TestAccAPIGatewayV2Integration_disappears
=== RUN TestAccAPIGatewayV2Integration_dataMappingHTTP
=== PAUSE TestAccAPIGatewayV2Integration_dataMappingHTTP
=== RUN TestAccAPIGatewayV2Integration_integrationTypeHTTP
=== PAUSE TestAccAPIGatewayV2Integration_integrationTypeHTTP
=== RUN TestAccAPIGatewayV2Integration_lambdaWebSocket
=== PAUSE TestAccAPIGatewayV2Integration_lambdaWebSocket
=== RUN TestAccAPIGatewayV2Integration_lambdaHTTP
=== PAUSE TestAccAPIGatewayV2Integration_lambdaHTTP
=== RUN TestAccAPIGatewayV2Integration_vpcLinkWebSocket
=== PAUSE TestAccAPIGatewayV2Integration_vpcLinkWebSocket
=== RUN TestAccAPIGatewayV2Integration_vpcLinkHTTP
=== PAUSE TestAccAPIGatewayV2Integration_vpcLinkHTTP
=== RUN TestAccAPIGatewayV2Integration_serviceIntegration
=== PAUSE TestAccAPIGatewayV2Integration_serviceIntegration
=== RUN TestAccAPIGatewayV2Route_basic
=== PAUSE TestAccAPIGatewayV2Route_basic
=== RUN TestAccAPIGatewayV2Route_disappears
=== PAUSE TestAccAPIGatewayV2Route_disappears
=== RUN TestAccAPIGatewayV2Route_authorizer
=== PAUSE TestAccAPIGatewayV2Route_authorizer
=== RUN TestAccAPIGatewayV2Route_jwtAuthorization
=== PAUSE TestAccAPIGatewayV2Route_jwtAuthorization
=== RUN TestAccAPIGatewayV2Route_model
=== PAUSE TestAccAPIGatewayV2Route_model
=== RUN TestAccAPIGatewayV2Route_requestParameters
=== PAUSE TestAccAPIGatewayV2Route_requestParameters
=== RUN TestAccAPIGatewayV2Route_simpleAttributes
=== PAUSE TestAccAPIGatewayV2Route_simpleAttributes
=== RUN TestAccAPIGatewayV2Route_target
=== PAUSE TestAccAPIGatewayV2Route_target
=== RUN TestAccAPIGatewayV2Route_updateRouteKey
=== PAUSE TestAccAPIGatewayV2Route_updateRouteKey
=== CONT TestAccAPIGatewayV2Integration_basicWebSocket
=== CONT TestAccAPIGatewayV2Route_basic
=== CONT TestAccAPIGatewayV2Route_requestParameters
=== CONT TestAccAPIGatewayV2Route_jwtAuthorization
=== CONT TestAccAPIGatewayV2Route_model
--- PASS: TestAccAPIGatewayV2Integration_basicWebSocket (24.62s)
=== CONT TestAccAPIGatewayV2Route_authorizer
--- PASS: TestAccAPIGatewayV2Route_basic (25.03s)
=== CONT TestAccAPIGatewayV2Integration_vpcLinkHTTP
--- PASS: TestAccAPIGatewayV2Route_model (25.46s)
=== CONT TestAccAPIGatewayV2Integration_serviceIntegration
=== CONT TestAccAPIGatewayV2Integration_vpcLinkHTTP
integration_test.go:457: Step 1/4 error: Error running apply: exit status 1
Error: reading EC2 VPC (vpc-0bc6d48f1349e9535) Attribute (enableDnsHostnames): couldn't find resource
with aws_vpc.test,
on terraform_plugin_test.tf line 7, in resource "aws_vpc" "test":
7: resource "aws_vpc" "test" {
--- FAIL: TestAccAPIGatewayV2Integration_vpcLinkHTTP (11.56s)
=== CONT TestAccAPIGatewayV2Integration_vpcLinkWebSocket
--- PASS: TestAccAPIGatewayV2Route_requestParameters (50.18s)
=== CONT TestAccAPIGatewayV2Route_disappears
--- PASS: TestAccAPIGatewayV2Route_jwtAuthorization (56.22s)
=== CONT TestAccAPIGatewayV2Integration_lambdaHTTP
--- PASS: TestAccAPIGatewayV2Route_disappears (17.82s)
=== CONT TestAccAPIGatewayV2Integration_lambdaWebSocket
--- PASS: TestAccAPIGatewayV2Integration_serviceIntegration (60.08s)
=== CONT TestAccAPIGatewayV2Route_target
--- PASS: TestAccAPIGatewayV2Route_authorizer (62.55s)
=== CONT TestAccAPIGatewayV2Route_updateRouteKey
--- PASS: TestAccAPIGatewayV2Integration_lambdaHTTP (45.32s)
=== CONT TestAccAPIGatewayV2Route_simpleAttributes
--- PASS: TestAccAPIGatewayV2Route_target (20.47s)
=== CONT TestAccAPIGatewayV2Integration_dataMappingHTTP
--- PASS: TestAccAPIGatewayV2Integration_lambdaWebSocket (39.57s)
=== CONT TestAccAPIGatewayV2Integration_disappears
--- PASS: TestAccAPIGatewayV2Route_updateRouteKey (33.01s)
=== CONT TestAccAPIGatewayV2Integration_integrationTypeHTTP
--- PASS: TestAccAPIGatewayV2Integration_disappears (17.13s)
=== CONT TestAccAPIGatewayV2Integration_basicHTTP
--- PASS: TestAccAPIGatewayV2Integration_dataMappingHTTP (33.52s)
--- PASS: TestAccAPIGatewayV2Integration_basicHTTP (20.96s)
--- PASS: TestAccAPIGatewayV2Route_simpleAttributes (46.75s)
--- PASS: TestAccAPIGatewayV2Integration_integrationTypeHTTP (32.92s)
--- PASS: TestAccAPIGatewayV2Integration_vpcLinkWebSocket (703.49s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/apigatewayv2 745.515s
FAIL
make: *** [testacc] Error 1
The failure is unrelated to this change.
@zjalicf-cyberlab Thanks for the contribution 🎉 👏. |
Thank you @ewbankkit :D |
This functionality has been released in v4.59.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! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
During automated CI/CD deployment of my application, I noticed the next error in my logs:
ConflictException: Unable to complete operation due to concurrent modification. Please try again later.
This error occurs when steps to add routes to APIGWV2 resource are started, after 6 routes this error happens.
Looking into the way this is handled in aws provider for apigateway (ver1), I have implemented the same error handling for apigatewayv2.
Relations
Closes #18018.
Output from Acceptance Testing
Since this is a simple change I believe tests are not needed.