-
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
Add retry mechanism and timeout when reading ecr_repository #3910
Conversation
4c3e44e
to
9a60049
Compare
I noticed this is marked
|
When creating an ECR repository, creation can be successful but it may not be available right away through DescribeRepositories API request. We add a retry mechanism until the repository appears instead of marking the repository as not existing. Fixes hashicorp#3849
9a60049
to
46b511f
Compare
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.
Sorry for the delay merging this 😅 LGTM with one minor adjustment.
--- PASS: TestAccAWSEcrRepository_basic (11.92s)
@@ -22,6 +22,11 @@ func resourceAwsEcrRepository() *schema.Resource { | |||
State: schema.ImportStatePassthrough, | |||
}, | |||
|
|||
Timeouts: &schema.ResourceTimeout{ | |||
Read: schema.DefaultTimeout(1 * time.Minute), |
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.
Our current practice is to hardcode eventual consistency timeouts so will remove this configurable timeout here. If we are changing this practice, we should do so everywhere.
``` --- PASS: TestAccAWSEcrRepository_basic (11.92s) ```
This has been released in version 1.40.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
When creating an ECR repository, creation can be successful but it may
not be available right away through DescribeRepositories API request. We
add a retry mechanism until the repository appears instead of marking
the repository as not existing.
Fixes #3849
Follows #3859 but uses another branch to avoid overriding the master branch of our fork.