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

All resources should have configurable timeouts #3954

Open
danawillow opened this issue Jul 2, 2019 · 3 comments
Open

All resources should have configurable timeouts #3954

danawillow opened this issue Jul 2, 2019 · 3 comments

Comments

@danawillow
Copy link
Contributor

And we should get rid of the OperationWait() methods that don't have them so that we can guarantee across the codebase that we're using them.

Inspired by GoogleCloudPlatform/magic-modules#2001, where a user caught a bug where one of our resources had a timeouts block declared, but it wasn't used everywhere, and so their timeouts didn't work. In the past, we could make the case that the user should check the docs to see which resources do and don't support timeouts, but it's harder to make now that we have so many resources that do, and so few that don't.

@danawillow
Copy link
Contributor Author

danawillow commented Apr 28, 2020

The merged PR fixes most of these. Here's a list of resources which, according to their documentation, don't support timeouts (grep -rL 'Timeouts' website/docs/r/):

  • bigquery_table
  • bigtable_gc_policy Support configurable timeouts for Bigtable resources #13045
  • bigtable_instance
  • bigtable_table
  • cloudiot_registry
  • compute_security_policy
  • container_registry
  • dataflow_job
  • dns_record_set
  • folder
  • folder_organization_policy
  • logging_billing_account_exclusion
  • logging_billing_account_sink
  • logging_folder_exclusion
  • logging_folder_sink
  • logging_organization_exclusion
  • logging_organization_sink
  • logging_project_exclusion
  • logging_project_sink
  • organization_policy
  • project
  • project_organization_policy
  • project_service
  • runtimeconfig_config
  • runtimeconfig_variable
  • service_account
  • service_account_key
  • service_networking_connection
  • storage_bucket
  • storage_bucket_acl
  • storage_bucket_object
  • storage_default_object_acl
  • storage_notification
  • storage_object_acl
  • storage_transfer_job

I didn't bother checking whether the docs+code matched. Also, no IAM resources support timeouts as far as I'm aware. Before doing IAM ones, we'd probably want to convert the eventual consistency checks into the framework introduced in #4993.

For resources with synchronous calls, we could add retry logic which takes a timeout. For extra credit, we could send a context with a timeout into the request that we send, though I think our synchronous calls tend to return quickly, so I don't think it would really be worth it.

@danawillow danawillow removed their assignment Apr 28, 2020
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Oct 12, 2020
…e Checks (hashicorp#3954)

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Oct 12, 2020
…e Checks (#3954) (#7499)

Signed-off-by: Modular Magician <magic-modules@google.com>
@grayside
Copy link

grayside commented Apr 1, 2021

I'm currently running into the lack of timeout support for google_storage_bucket_object, error seems like I need a larger timeout to support an archive upload.

My specific case could be mitigated by hashicorp/terraform-provider-archive#62. I'm now stuck considering how to reimplement my archive handling because my upload bandwidth is constrained (or the error is obfuscating a deeper problem).

@danawillow
Copy link
Contributor Author

Hey @grayside, you'll probably have better luck filing a new issue specifically for that resource :)

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

No branches or pull requests

3 participants