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

test/resource/aws_api_gateway_usage_plan: Prevent intermittent ConflictException errors for concurrent deployments #7925

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 13, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Previously, the test configurations could trigger two deployments at the same time since the ordering was not guaranteed. If we still see issues with this error in the future even with ordering these properly, we can consider allowing retries in the aws_api_gateway_deployment resource for this error.

Previous output from acceptance testing:

--- FAIL: TestAccAWSAPIGatewayUsagePlan_basic (738.05s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id dy728fw3i3 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_productCode (59.28s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id uf0qt1c7da . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_throttling (439.70s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id nu0670a339 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_apiStages (27.48s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id edoilchkxb . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_importBasic (122.32s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id 4t4s36a8a3 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_quota (375.79s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id 1snamo3rpa . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit (905.32s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id xlnb4foagg . Please try again later.

Output from acceptance testing:

--- PASS: TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit (68.05s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_apiStages (99.87s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_importBasic (129.23s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_basic (199.02s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_throttling (235.79s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_quota (262.42s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_description (301.14s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_productCode (345.68s)

…ctException errors for concurrent deployments

Previously, the test configurations could trigger two deployments at the same time since the ordering was not guaranteed. If we still see issues with this error in the future even with ordering these properly, we can consider allowing retries in the `aws_api_gateway_deployment` resource for this error.

Previous output from acceptance testing:

```
--- FAIL: TestAccAWSAPIGatewayUsagePlan_basic (738.05s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id dy728fw3i3 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_productCode (59.28s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id uf0qt1c7da . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_throttling (439.70s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id nu0670a339 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_apiStages (27.48s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id edoilchkxb . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_importBasic (122.32s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id 4t4s36a8a3 . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_quota (375.79s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id 1snamo3rpa . Please try again later.

--- FAIL: TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit (905.32s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating API Gateway Deployment: ConflictException: Another Deployment is in progress for rest api with id xlnb4foagg . Please try again later.
```

Output from acceptance testing:

```
--- PASS: TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit (68.05s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_apiStages (99.87s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_importBasic (129.23s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_basic (199.02s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_throttling (235.79s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_quota (262.42s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_description (301.14s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_productCode (345.68s)
```
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/apigateway Issues and PRs that pertain to the apigateway service. labels Mar 13, 2019
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Mar 13, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bflad bflad added this to the v2.2.0 milestone Mar 14, 2019
@bflad bflad merged commit 81ed345 into master Mar 14, 2019
@bflad bflad deleted the t-aws_api_gateway_usage_plan-ConflictException branch March 14, 2019 16:40
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigateway Issues and PRs that pertain to the apigateway service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants