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

Final retries for various DB timeouts #9477

Merged
merged 2 commits into from
Jul 24, 2019
Merged

Final retries for various DB timeouts #9477

merged 2 commits into from
Jul 24, 2019

Conversation

ryndaniels
Copy link
Contributor

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

Relates #7873

Release note for CHANGELOG:

* resource/aws_db_instance: Retries after timeouts creating DB instances
* resource/aws_db_option_group: Retry after timeout deleting DB option group
* resource/aws_db_parameter_group: Retry after timeout deleting DB parameter group

Output from acceptance testing:

NOTE: the DB instance failures are not new failures


make testacc TESTARGS="-run=TestAccAWSDBOptionGroup"          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSDBOptionGroup -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSDBOptionGroup_basic
=== PAUSE TestAccAWSDBOptionGroup_basic
=== RUN   TestAccAWSDBOptionGroup_timeoutBlock
=== PAUSE TestAccAWSDBOptionGroup_timeoutBlock
=== RUN   TestAccAWSDBOptionGroup_namePrefix
=== PAUSE TestAccAWSDBOptionGroup_namePrefix
=== RUN   TestAccAWSDBOptionGroup_generatedName
=== PAUSE TestAccAWSDBOptionGroup_generatedName
=== RUN   TestAccAWSDBOptionGroupConfig_OptionGroupDescription
=== PAUSE TestAccAWSDBOptionGroupConfig_OptionGroupDescription
=== RUN   TestAccAWSDBOptionGroup_basicDestroyWithInstance
=== PAUSE TestAccAWSDBOptionGroup_basicDestroyWithInstance
=== RUN   TestAccAWSDBOptionGroup_Option_OptionSettings
=== PAUSE TestAccAWSDBOptionGroup_Option_OptionSettings
=== RUN   TestAccAWSDBOptionGroup_Option_OptionSettings_IAMRole
=== PAUSE TestAccAWSDBOptionGroup_Option_OptionSettings_IAMRole
=== RUN   TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
=== PAUSE TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
=== RUN   TestAccAWSDBOptionGroup_OracleOptionsUpdate
=== PAUSE TestAccAWSDBOptionGroup_OracleOptionsUpdate
=== RUN   TestAccAWSDBOptionGroup_Option_OptionSettings_MultipleNonDefault
=== PAUSE TestAccAWSDBOptionGroup_Option_OptionSettings_MultipleNonDefault
=== RUN   TestAccAWSDBOptionGroup_multipleOptions
=== PAUSE TestAccAWSDBOptionGroup_multipleOptions
=== RUN   TestAccAWSDBOptionGroup_Tags
=== PAUSE TestAccAWSDBOptionGroup_Tags
=== RUN   TestAccAWSDBOptionGroup_Tags_WithOptions
=== PAUSE TestAccAWSDBOptionGroup_Tags_WithOptions
=== CONT  TestAccAWSDBOptionGroup_basic
=== CONT  TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
=== CONT  TestAccAWSDBOptionGroup_Option_OptionSettings_MultipleNonDefault
=== CONT  TestAccAWSDBOptionGroup_Tags_WithOptions
=== CONT  TestAccAWSDBOptionGroup_Option_OptionSettings_IAMRole
=== CONT  TestAccAWSDBOptionGroup_Option_OptionSettings
=== CONT  TestAccAWSDBOptionGroup_basicDestroyWithInstance
=== CONT  TestAccAWSDBOptionGroupConfig_OptionGroupDescription
=== CONT  TestAccAWSDBOptionGroup_generatedName
=== CONT  TestAccAWSDBOptionGroup_namePrefix
=== CONT  TestAccAWSDBOptionGroup_Tags
=== CONT  TestAccAWSDBOptionGroup_timeoutBlock
=== CONT  TestAccAWSDBOptionGroup_multipleOptions
=== CONT  TestAccAWSDBOptionGroup_OracleOptionsUpdate
--- PASS: TestAccAWSDBOptionGroup_namePrefix (30.20s)
--- PASS: TestAccAWSDBOptionGroup_generatedName (30.27s)
--- PASS: TestAccAWSDBOptionGroup_timeoutBlock (30.34s)
--- PASS: TestAccAWSDBOptionGroupConfig_OptionGroupDescription (30.35s)
--- PASS: TestAccAWSDBOptionGroup_basic (30.41s)
--- PASS: TestAccAWSDBOptionGroup_multipleOptions (31.13s)
--- PASS: TestAccAWSDBOptionGroup_Option_OptionSettings_IAMRole (48.18s)
--- PASS: TestAccAWSDBOptionGroup_sqlServerOptionsUpdate (49.38s)
--- PASS: TestAccAWSDBOptionGroup_Option_OptionSettings_MultipleNonDefault (50.20s)
--- PASS: TestAccAWSDBOptionGroup_Option_OptionSettings (54.21s)
--- PASS: TestAccAWSDBOptionGroup_OracleOptionsUpdate (60.98s)
--- PASS: TestAccAWSDBOptionGroup_Tags (69.66s)
--- PASS: TestAccAWSDBOptionGroup_Tags_WithOptions (71.62s)
--- PASS: TestAccAWSDBOptionGroup_basicDestroyWithInstance (460.79s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       461.928s

make testacc TESTARGS="-run=TestAccAWSDBParameterGroup" 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSDBParameterGroup -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSDBParameterGroup_importBasic
=== PAUSE TestAccAWSDBParameterGroup_importBasic
=== RUN   TestAccAWSDBParameterGroup_limit
=== PAUSE TestAccAWSDBParameterGroup_limit
=== RUN   TestAccAWSDBParameterGroup_basic
=== PAUSE TestAccAWSDBParameterGroup_basic
=== RUN   TestAccAWSDBParameterGroup_Disappears
=== PAUSE TestAccAWSDBParameterGroup_Disappears
=== RUN   TestAccAWSDBParameterGroup_namePrefix
=== PAUSE TestAccAWSDBParameterGroup_namePrefix
=== RUN   TestAccAWSDBParameterGroup_generatedName
=== PAUSE TestAccAWSDBParameterGroup_generatedName
=== RUN   TestAccAWSDBParameterGroup_withApplyMethod
=== PAUSE TestAccAWSDBParameterGroup_withApplyMethod
=== RUN   TestAccAWSDBParameterGroup_Only
=== PAUSE TestAccAWSDBParameterGroup_Only
=== RUN   TestAccAWSDBParameterGroup_MatchDefault
=== PAUSE TestAccAWSDBParameterGroup_MatchDefault
=== CONT  TestAccAWSDBParameterGroup_importBasic
=== CONT  TestAccAWSDBParameterGroup_withApplyMethod
=== CONT  TestAccAWSDBParameterGroup_MatchDefault
=== CONT  TestAccAWSDBParameterGroup_generatedName
=== CONT  TestAccAWSDBParameterGroup_namePrefix
=== CONT  TestAccAWSDBParameterGroup_Only
=== CONT  TestAccAWSDBParameterGroup_Disappears
=== CONT  TestAccAWSDBParameterGroup_basic
=== CONT  TestAccAWSDBParameterGroup_limit
--- PASS: TestAccAWSDBParameterGroup_Disappears (26.31s)
--- PASS: TestAccAWSDBParameterGroup_Only (29.21s)
--- PASS: TestAccAWSDBParameterGroup_MatchDefault (34.57s)
--- PASS: TestAccAWSDBParameterGroup_namePrefix (37.00s)
--- PASS: TestAccAWSDBParameterGroup_generatedName (37.03s)
--- PASS: TestAccAWSDBParameterGroup_withApplyMethod (38.32s)
--- PASS: TestAccAWSDBParameterGroup_importBasic (43.44s)
--- PASS: TestAccAWSDBParameterGroup_basic (70.52s)
--- PASS: TestAccAWSDBParameterGroup_limit (73.23s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       74.092s


--- FAIL: TestAccAWSDBInstance_optionGroup (10.07s)
--- SKIP: TestAccAWSDBInstance_ReplicateSourceDb_DeletionProtection (0.00s)
--- PASS: TestAccAWSDBInstance_iamAuth (355.52s)
--- PASS: TestAccAWSDBInstance_generatedName (355.83s)
--- PASS: TestAccAWSDBInstance_basic (356.18s)
--- PASS: TestAccAWSDBInstance_AllowMajorVersionUpgrade (392.17s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier_SkipFinalSnapshot (486.31s)
--- PASS: TestAccAWSDBInstance_namePrefix (495.88s)
--- PASS: TestAccAWSDBInstance_MaxAllocatedStorage (503.77s)
--- PASS: TestAccAWSDBInstance_kmsKey (565.97s)
--- PASS: TestAccAWSDBInstance_DeletionProtection (593.58s)
--- PASS: TestAccAWSDBInstance_IsAlreadyBeingDeleted (618.79s)
--- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade (637.70s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier (688.64s)
--- PASS: TestAccAWSDBInstance_subnetGroup (871.93s)

@ryndaniels ryndaniels requested review from bflad and a team July 24, 2019 14:23
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 24, 2019
@bflad bflad added the bug Addresses a defect in current functionality. label Jul 24, 2019
@bflad bflad added this to the v2.21.0 milestone Jul 24, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

One minor typo, otherwise looks good! 🚀

}
return resource.NonRetryableError(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

aws/resource_aws_db_parameter_group.go Outdated Show resolved Hide resolved
@@ -167,11 +167,11 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) {
resource.TestCheckResourceAttr("aws_db_parameter_group.large", "parameter.1708034931.name", "character_set_results"),
resource.TestCheckResourceAttr("aws_db_parameter_group.large", "parameter.1708034931.value", "utf8"),
resource.TestCheckResourceAttr("aws_db_parameter_group.large", "parameter.1937131004.name", "event_scheduler"),
resource.TestCheckResourceAttr("aws_db_parameter_group.large", "parameter.1937131004.value", "on"),
resource.TestCheckResourceAttr("aws_db_parameter_group.large", "parameter.1937131004.value", "ON"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for adjusting these. They have been problematic since Terraform 0.12 was vendored and this test adjustment is appropriate for now.

Co-Authored-By: Brian Flad <bflad417@gmail.com>
@ryndaniels ryndaniels merged commit 5537b0f into master Jul 24, 2019
@ryndaniels ryndaniels deleted the rfd-retry-db branch July 24, 2019 17:50
@bflad
Copy link
Contributor

bflad commented Jul 26, 2019

This has been released in version 2.21.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, documentation updates, or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
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. service/rds Issues and PRs that pertain to the rds service. size/M 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.

None yet

2 participants