Skip to content

Use the delete timeout when waiting for service networking connection deletion - #18469

Open
ab0utbla-k wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ab0utbla-k:fix-snc-delete-timeout
Open

Use the delete timeout when waiting for service networking connection deletion#18469
ab0utbla-k wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ab0utbla-k:fix-snc-delete-timeout

Conversation

@ab0utbla-k

Copy link
Copy Markdown

resourceServiceNetworkingConnectionDelete passes schema.TimeoutCreate to the operation waiter instead of schema.TimeoutDelete:

https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/services/servicenetworking/resource_service_networking_connection.go#L354

Create and update already use their own timeouts (TimeoutCreate / TimeoutUpdate), so delete looks like an oversight.

Effect on users: a configured delete timeout is silently ignored, and the create timeout governs the delete wait instead.

resource "google_service_networking_connection" "default" {
  # ...
  timeouts {
    create = "10m"
    delete = "40m" # ignored today; the wait uses create's 10m
  }
}

All three defaults are 10m, so the default behaviour is unchanged and this only surfaces once someone sets a custom timeout. That matters for this resource in particular, since deletes can be slow when service producer resources are still being released.

Tests

No new test. The bug is not observable through the acceptance test framework — it only changes how long the waiter is allowed to run, and asserting on it would mean a test that deliberately waits out a timeout.

Verified by generating both providers; the downstream diff is this one line in each:

  • google/services/servicenetworking/resource_service_networking_connection.go
  • google-beta/services/servicenetworking/resource_service_networking_connection.go

go build ./... and go vet ./google/services/servicenetworking/... pass.

servicenetworking: fixed `google_service_networking_connection` ignoring the configured `delete` timeout, which used the `create` timeout instead

@google-cla

google-cla Bot commented Jul 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 30, 2026
@github-actions
github-actions Bot requested a review from ScottSuarez July 30, 2026 14:47
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

… deletion

resourceServiceNetworkingConnectionDelete passed schema.TimeoutCreate to
the operation waiter, so a user-configured `delete` timeout was ignored
and the `create` timeout governed the delete wait instead. Create and
update already use their own timeouts.
@ab0utbla-k
ab0utbla-k force-pushed the fix-snc-delete-timeout branch from 3d0aea2 to c3c594c Compare July 30, 2026 14:54
@modular-magician modular-magician added service/service-networking and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 30, 2026
@modular-magician

modular-magician commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c3c594c:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 1 insertion(+), 1 deletion(-)
google-beta provider View Diff 1 file changed, 1 insertion(+), 1 deletion(-)

Test report

Analytics

Total Tests Passed Skipped Affected
9 9 0 0
Affected Service Packages
  • servicenetworking

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@ab0utbla-k VCR tests complete for c3c594c!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants