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/rds_cluster: Retry modification on InvalidDBClusterStateFault #18

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Jun 13, 2017

This is to address the following test failure:

=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- FAIL: TestAccAWSRDSCluster_backupsUpdate (110.40s)
    testing.go:428: Step 1 error: Error applying: 1 error(s) occurred:
        
        * aws_rds_cluster.default: 1 error(s) occurred:
        
        * aws_rds_cluster.default: [WARN] Error modifying RDS Cluster (tf-aurora-cluster-4399690208005989315): InvalidDBClusterStateFault: Db Cluster is not available for modifcation with status backing-up
            status code: 400, request id: 96fafc6a-4f48-11e7-a506-eb730ce30037

5 mins is just an arbitrary value which may change if we see failures in the future.

Test results

$ make testacc TESTARGS='-run=TestAccAWSRDSCluster_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccAWSRDSCluster_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSRDSCluster_importBasic
--- PASS: TestAccAWSRDSCluster_importBasic (123.97s)
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (122.37s)
=== RUN   TestAccAWSRDSCluster_namePrefix
--- PASS: TestAccAWSRDSCluster_namePrefix (171.93s)
=== RUN   TestAccAWSRDSCluster_generatedName
--- PASS: TestAccAWSRDSCluster_generatedName (175.72s)
=== RUN   TestAccAWSRDSCluster_takeFinalSnapshot
--- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (127.27s)
=== RUN   TestAccAWSRDSCluster_missingUserNameCausesError
--- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (7.30s)
=== RUN   TestAccAWSRDSCluster_updateTags
--- PASS: TestAccAWSRDSCluster_updateTags (172.02s)
=== RUN   TestAccAWSRDSCluster_kmsKey
--- PASS: TestAccAWSRDSCluster_kmsKey (174.49s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (121.68s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (147.90s)
=== RUN   TestAccAWSRDSCluster_iamAuth
--- PASS: TestAccAWSRDSCluster_iamAuth (122.09s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1466.747s

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Jun 13, 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.

LGTM here!

Left a small non-significant question :)

_, err := conn.ModifyDBCluster(req)
if err != nil {
awsErr, ok := err.(awserr.Error)
if ok && awsErr.Code() == "InvalidDBClusterStateFault" {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of using the related constant here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't actually use constants anywhere else in the provider in this context, but it sounds like a good idea.

@radeksimko radeksimko merged commit e8f1d70 into master Jun 13, 2017
@radeksimko radeksimko deleted the b-rds-cluster-retry-mod branch June 13, 2017 10:16
catsby added a commit that referenced this pull request Jan 3, 2018
#2713)

* Add "Data Source:" to main heading of data source resources (issue #18)
catsby added a commit that referenced this pull request Jan 3, 2018
#2713)

* Add "Data Source:" to main heading of data source resources (issue #18)
@ghost
Copy link

ghost commented Apr 12, 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 12, 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.

2 participants