[Internal Range] Fix for issue #27175#17722
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 63760d2: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @dorianverna VCR tests complete for 63760d2! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 0e8230f: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @dorianverna VCR tests complete for 0e8230f! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit e6ae463: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @dorianverna VCR tests complete for e6ae463! |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @NickElliot, 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. |
|
Hi @SirGitsalot, since we detected a culprit with the last PR trying to solve these issues, can you please take a look at this PR as well? #17431 Thanks a lot! |
|
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
@modular-magician reassign-reviewer |
|
@modular-magician reassign-reviewer @NickElliot reassigning to Nick as the original reviewer. |
|
Revert PR #17698 discusses the reasons for revert. |
|
@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
NickElliot
left a comment
There was a problem hiding this comment.
tests the original fix was causing to fail passed in a manual teamcity run, the described fix as implemented should be fully covering the problematic situation. LGTM
a3e2544
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.
Issue: hashicorp/terraform-provider-google#27175
Summary of Changes & Solutions
This PR replaces the previous reverted implementation (#17431) with a safer solution.
Please see the following matters:
1. Safer GKE Cluster Protections
Strictly enforcing that the subnetwork empty PATCH is sent when the user explicitly sets the virtual flag
send_secondary_ip_range_if_empty = true, this way GKE-managed ranges (which do not set this flag) are now completely safe from unintended capacity deletions.2. Bug 1: Detaching/Deleting InternalRange (#27175)
google_network_connectivity_internal_rangeresource while the subnetwork still has it registered in GCP, resulting in a400 Resource already being usedfailure.internal_range_retry.go.tmpl) inInternalRangedeletion. It intercepts GCE's 400 "already being used" error and retries, allowing GCE's eventual-consistency detachment to propagate.InternalRangeitself are planned for deletion in the exact same step.secondary_ip_rangeblocks from HCL, keep theInternalRangeblock in HCL to preserve the activedepends_onedge. This forces Terraform core to successfully execute the subnetUpdatePATCH.InternalRangeblock from HCL. Since the subnet released it in Step 4, deletion is successful.3. Bug 2: Positional Stability & Index-Based Reordering
unordered_list: truebreaking change (which broke schema structures and GKE clusters).resourceComputeSubnetworkSecondaryIpRangeSetStyleDiffindex alignment function in the subnetwork constants templates. It maps surviving/existing ranges to their original index slots, preventing positional shifts and schema breakage.