-
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
resource/aws_codedeploy_deployment_group: Fixes for tfproviderlint R006 #12042
Conversation
Reference: #11864 `RetryFunc` should only be used when logic has a retryable condition. In the case of working with the AWS Go SDK, it also arbitrarily restricts the automatic retrying logic of API calls to the timeout, which is generally undesired. This particular case is a false positive, but does indicate this resource is not following the current practice of inlining the error handling in this retry function. Another option here would be to have the retryable error checking as a boolean returning function, in which the `RetryFunc` triggers `return resource.RetryableError(err)`. Previously: ``` aws/resource_aws_codedeploy_deployment_group.go:554:38: R006: RetryFunc should include RetryableError() handling or be removed aws/resource_aws_codedeploy_deployment_group.go:734:38: R006: RetryFunc should include RetryableError() handling or be removed ``` Output from acceptance testing: ``` --- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (34.18s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (43.48s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (51.83s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (70.71s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (36.35s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (49.34s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (59.52s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (45.27s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (63.68s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (53.52s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (50.69s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (166.59s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (59.43s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (48.95s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (173.58s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (51.83s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (47.18s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (60.90s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (74.54s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (44.40s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (318.29s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_create (30.55s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_update (68.76s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (44.55s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (40.08s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (28.30s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (37.85s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (42.57s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (56.71s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (31.77s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (43.51s) --- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (59.76s) ```
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 🚀
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (29.80s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (30.16s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (34.34s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (36.05s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (36.61s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (37.59s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (38.29s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (42.45s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (44.84s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (47.01s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (49.29s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (49.36s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (50.81s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (25.01s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_create (20.82s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (33.18s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (64.93s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (32.37s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_update (33.41s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (37.25s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (28.52s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (74.82s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (29.50s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (29.92s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (83.90s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (88.35s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (88.65s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (101.80s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (123.71s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (132.73s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (160.78s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (266.13s)
This has been released in version 2.50.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
Reference: #11864
Release note for CHANGELOG:
RetryFunc
should only be used when logic has a retryable condition. In the case of working with the AWS Go SDK, it also arbitrarily restricts the automatic retrying logic of API calls to the timeout, which is generally undesired.This particular case is a false positive, but does indicate this resource is not following the current practice of inlining the error handling in this retry function. Another option here would be to have the retryable error checking as a boolean returning function, in which the
RetryFunc
triggersreturn resource.RetryableError(err)
.Previously:
Output from acceptance testing: