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

Storage: Use configurable timeouts to google_storage_bucket #5542

Merged
merged 3 commits into from
Dec 21, 2021

Conversation

turkenh
Copy link
Contributor

@turkenh turkenh commented Dec 13, 2021

Fixes hashicorp/terraform-provider-google#10423

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

storage: added configurable read timeout to `google_storage_bucket`

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@c2thorn, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 12 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 12 insertions(+), 1 deletion(-))

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 52 insertions(+), 41 deletions(-))
Terraform Beta: Diff ( 3 files changed, 52 insertions(+), 41 deletions(-))

@@ -36,6 +36,10 @@ func resourceStorageBucket() *schema.Resource {
customdiff.ForceNewIfChange("retention_policy.0.is_locked", isPolicyLocked),
),

Timeouts: &schema.ResourceTimeout{
Read: schema.DefaultTimeout(4 * time.Minute),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to extend the scope of the PR mainly focusing on fixing this issue, but happy to add other timeouts (Create/Update/Delete) here as well.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @turkenh thanks for working on this. If you wouldn't mind, adding the other timeouts should be helpful as well.

Have you confirmed that adding this removes the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@c2thorn added all timeouts.

Have you confirmed that adding this removes the issue?

I've tested and confirmed that with the default timeouts here, it takes 4m (instead of 20m) with the case described in the issue.
Now timeouts being configurable, I've also verified that providing even a smaller timeout, e.g. 1m, works as expected.

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh turkenh force-pushed the bucket-read-timeout branch from 6c65ff3 to 22d5aa2 Compare December 15, 2021 07:53
@turkenh turkenh changed the title Storage: Use configurable read timeout in google_storage_bucket Storage: Use configurable timeouts to google_storage_bucket Dec 15, 2021
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 18 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 36 insertions(+), 19 deletions(-))

turkenh added a commit to turkenh/terraform-provider-google that referenced this pull request Dec 15, 2021
@c2thorn
Copy link
Member

c2thorn commented Dec 15, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 18 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 18 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeForwardingRule_update|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=232192

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh turkenh requested a review from c2thorn December 16, 2021 07:54
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 16 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 16 insertions(+), 1 deletion(-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloud storage bucket retries slowing state refreshes
3 participants