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_lb_listener: Prevent panics on creation and refresh when API throttled #12617

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 1, 2020

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11640

Release note for CHANGELOG:

* resource/aws_lb_listener: Prevent panics on creation and refresh when API throttled

The previous code was incorrectly not setting the response object when entering final retry logic (isResourceTimeoutError) that occurs during API throttling. Since inducing throttling errors is not guaranteed via the acceptance testing without potentially very larges amounts of infrastructure, this change is only verified against regressions.

Output from acceptance testing:

--- PASS: TestAccAWSLBListener_basic (187.33s)
--- PASS: TestAccAWSLBListener_https (189.02s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order (189.74s)
--- PASS: TestAccAWSLBListener_fixedResponse (194.36s)
--- PASS: TestAccAWSLBListener_redirect (194.86s)
--- PASS: TestAccAWSLBListener_oidc (196.38s)
--- PASS: TestAccAWSLBListener_cognito (196.86s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order_Recreates (205.20s)
--- PASS: TestAccAWSLBListener_BackwardsCompatibility (205.18s)
--- PASS: TestAccAWSLBListener_Protocol_Tls (605.87s)
--- PASS: TestAccAWSLBListener_basicUdp (679.00s)

… API throttled

Reference: #11640

The previous code was incorrectly not setting the response object when entering final retry logic (`isResourceTimeoutError`) that occurs during API throttling. Since inducing throttling errors is not guaranteed via the acceptance testing without potentially very larges amounts of infrastructure, this change is only verified against regressions.

Output from acceptance testing:

```
--- PASS: TestAccAWSLBListener_basic (187.33s)
--- PASS: TestAccAWSLBListener_https (189.02s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order (189.74s)
--- PASS: TestAccAWSLBListener_fixedResponse (194.36s)
--- PASS: TestAccAWSLBListener_redirect (194.86s)
--- PASS: TestAccAWSLBListener_oidc (196.38s)
--- PASS: TestAccAWSLBListener_cognito (196.86s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order_Recreates (205.20s)
--- PASS: TestAccAWSLBListener_BackwardsCompatibility (205.18s)
--- PASS: TestAccAWSLBListener_Protocol_Tls (605.87s)
--- PASS: TestAccAWSLBListener_basicUdp (679.00s)
```
@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Apr 1, 2020
@bflad bflad requested a review from a team April 1, 2020 19:16
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. service/elbv2 Issues and PRs that pertain to the elbv2 service. labels Apr 1, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Apr 1, 2020
@bflad bflad mentioned this pull request Apr 1, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

--- PASS: TestAccAWSLBListener_cognito (175.59s)
--- PASS: TestAccAWSLBListener_redirect (181.94s)
--- PASS: TestAccAWSLBListener_BackwardsCompatibility (183.14s)
--- PASS: TestAccAWSLBListener_https (184.84s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order_Recreates (184.92s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order (185.43s)
--- PASS: TestAccAWSLBListener_oidc (203.72s)
--- PASS: TestAccAWSLBListener_fixedResponse (203.97s)
--- PASS: TestAccAWSLBListener_Protocol_Tls (204.88s)
--- PASS: TestAccAWSLBListener_basic (205.98s)
--- PASS: TestAccAWSLBListener_basicUdp (218.65s)

@bflad bflad added this to the v2.60.0 milestone Apr 28, 2020
@bflad bflad merged commit 1c25d9c into master Apr 28, 2020
@bflad bflad deleted the b-aws_lb_listener-describe-panics branch April 28, 2020 19:04
bflad added a commit that referenced this pull request Apr 28, 2020
@ghost
Copy link

ghost commented May 1, 2020

This has been released in version 2.60.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!

adamdecaf pushed a commit to adamdecaf/terraform-provider-aws that referenced this pull request May 28, 2020
… API throttled (hashicorp#12617)

Reference: hashicorp#11640

The previous code was incorrectly not setting the response object when entering final retry logic (`isResourceTimeoutError`) that occurs during API throttling. Since inducing throttling errors is not guaranteed via the acceptance testing without potentially very larges amounts of infrastructure, this change is only verified against regressions.

Output from acceptance testing:

```
--- PASS: TestAccAWSLBListener_basic (187.33s)
--- PASS: TestAccAWSLBListener_https (189.02s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order (189.74s)
--- PASS: TestAccAWSLBListener_fixedResponse (194.36s)
--- PASS: TestAccAWSLBListener_redirect (194.86s)
--- PASS: TestAccAWSLBListener_oidc (196.38s)
--- PASS: TestAccAWSLBListener_cognito (196.86s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order_Recreates (205.20s)
--- PASS: TestAccAWSLBListener_BackwardsCompatibility (205.18s)
--- PASS: TestAccAWSLBListener_Protocol_Tls (605.87s)
--- PASS: TestAccAWSLBListener_basicUdp (679.00s)
```
@ghost
Copy link

ghost commented May 29, 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 May 29, 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. crash Results from or addresses a Terraform crash or kernel panic. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform Crashes
2 participants