-
Notifications
You must be signed in to change notification settings - Fork 205
feat: Timeout improvements for SDKv2 resources #3526
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
Conversation
APIx bot: a message has been sent to Docs Slack channel |
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.
Pull Request Overview
This PR improves timeout handling for MongoDB Atlas Terraform provider resources by implementing proper timeout configurations for SDKv2 resources with long-running operations.
- Adds timeout schema configuration to
mongodbatlas_online_archive
resource with 3-hour default - Applies best practice of setting StateChangeConf timeouts to be 1 minute less than CRUD operation timeouts
- Updates multiple resources to use proper timeout calculations to avoid SDK context deadline errors
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
internal/service/onlinearchive/resource_online_archive.go |
Adds timeout schema configuration and updates StateChangeConf timeout calculation |
internal/service/privatelinkendpointservice/resource_privatelink_endpoint_service.go |
Updates StateChangeConf timeout calculations for create operations |
internal/service/privatelinkendpoint/resource_privatelink_endpoint.go |
Updates StateChangeConf timeout calculation for create operation |
internal/service/networkpeering/resource_network_peering.go |
Updates StateChangeConf timeout calculation for create operation |
internal/service/clusteroutagesimulation/resource_cluster_outage_simulation.go |
Updates StateChangeConf timeout calculation and removes unused variable |
docs/resources/online_archive.md |
Documents the new timeouts attribute for online archive resource |
.changelog/3526.txt |
Adds changelog entry for the timeout enhancement |
internal/service/clusteroutagesimulation/resource_cluster_outage_simulation.go
Outdated
Show resolved
Hide resolved
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.
LGTM after addressing some minor comments.
internal/service/privatelinkendpointservice/resource_privatelink_endpoint_service.go
Outdated
Show resolved
Hide resolved
internal/service/privatelinkendpointservice/resource_privatelink_endpoint_service.go
Outdated
Show resolved
Hide resolved
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.
Nice. I would also consider changing the other parameters to be more consistent:
MinTimeout
Delay
Seems like we hard-code anything from 3s to 3min.
Suggestion: ~ 1 * time.Minute for MinTimeout
and ~30s for Delay (I think this is the delay before retrying)
Co-authored-by: Javier Armendáriz <136641722+xargom@users.noreply.github.com>
Description
and No Timeout configuration defined in the schema.Resource.
mongodbatlas_online_archive
needed to add timeout definition on the schemaLink to any related issue(s): CLOUDP-306804
Type of change:
Required Checklist:
Further comments