-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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/pinpoint_event_stream - retry on eventual consistency error #18305
r/pinpoint_event_stream - retry on eventual consistency error #18305
Conversation
Verified acceptance tests: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSPinpointEventStream_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSPinpointEventStream_ -timeout 180m
=== RUN TestAccAWSPinpointEventStream_basic
=== PAUSE TestAccAWSPinpointEventStream_basic
=== RUN TestAccAWSPinpointEventStream_disappears
=== PAUSE TestAccAWSPinpointEventStream_disappears
=== CONT TestAccAWSPinpointEventStream_basic
=== CONT TestAccAWSPinpointEventStream_disappears
--- PASS: TestAccAWSPinpointEventStream_disappears (66.57s)
--- PASS: TestAccAWSPinpointEventStream_basic (136.22s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 136.319s |
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.
Will adjust retry logic on merge, but otherwise looks good. Thank you, @DrFaust92 🚀
Output from acceptance testing in AWS Commercial:
--- PASS: TestAccAWSPinpointEventStream_disappears (71.12s)
--- PASS: TestAccAWSPinpointEventStream_basic (143.79s)
Output from acceptance testing in AWS GovCloud (US):
--- PASS: TestAccAWSPinpointEventStream_disappears (69.10s)
--- PASS: TestAccAWSPinpointEventStream_basic (148.10s)
// Retry for IAM eventual consistency | ||
_, err := retryOnAwsCode("BadRequestException", func() (interface{}, error) { | ||
return conn.PutEventStream(&req) | ||
}) |
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.
IAM eventual consistency retry logic should follow this Contributing Guide section: https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/contributing/retries-and-waiters.md#iam-error-retries
I would also recommend conditionalizing this based on the error message as well, since BadRequestException
by itself could retry on actually malformed requests.
This has been released in version 3.34.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 for triage. Thanks! |
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! |
Community Note
Closes #15899
Output from acceptance testing: