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

resource/aws_api_gateway_method_response: Fix conflict exception in API gateway method response #2393

Merged
merged 1 commit into from
Nov 21, 2017

Conversation

betabandido
Copy link
Contributor

This hopefully fixes #483

I have added a mutex to prevent concurrent method response creations. As this does not help with simultaneous executions of terraform (e.g., multiple developers deploying to the same AWS account), I have also added a retry block.

@radeksimko @steve-gray Does this look good to you?

@steve-gray
Copy link

@betabandido - LGTM. This was the bane of my life when I'm building terraform that deploys API Gateway instances.

I'd been running a hacked version of the provider locally with essentially the same change applied - though I used really aggressive retries, rather than a lock, because I was looking to go fast where possible. Would happily switch over to this though.

@Ninir Ninir added the bug Addresses a defect in current functionality. label Nov 21, 2017
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Hi @betabandido

This looks very good to me! thanks a lot for the work! 👍 🤖 🚀

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayRestApi_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSAPIGatewayRestApi_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayRestApi_basic
--- PASS: TestAccAWSAPIGatewayRestApi_basic (21.51s)
=== RUN   TestAccAWSAPIGatewayRestApi_openapi
--- PASS: TestAccAWSAPIGatewayRestApi_openapi (34.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	56.386s

make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayMethodResponse_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSAPIGatewayMethodResponse_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayMethodResponse_basic
--- PASS: TestAccAWSAPIGatewayMethodResponse_basic (26.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.074s

@Ninir Ninir merged commit a61a091 into hashicorp:master Nov 21, 2017
@Ninir Ninir changed the title Fix conflict exception in API gateway method response resource/aws_api_gateway_method_response: Fix conflict exception in API gateway method response Nov 21, 2017
@betabandido betabandido deleted the fix/method-response-conflict branch August 18, 2018 09:37
@ghost
Copy link

ghost commented Apr 3, 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 Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_api_gateway_method_response Concurrency
3 participants