[Internal Range] Fix for issue 27175#17431
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @hao-nan-li, 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 there, I'm the Modular magician. I've detected the following information about your changes for commit 00d463d: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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 build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @dorianverna, @hao-nan-li VCR tests complete for 00d463d! |
Create fix for secondary subnet issue #2. Create fix for secondary subnet issue GoogleCloudPlatform#3. Create fix for secondary subnet issue GoogleCloudPlatform#4.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 73a0de1: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportImportant Manual Verification Required VCR cannot automatically execute the following tests added in this PR. Please verify them manually: 🔴 TestAccComputeSubnetwork_secondaryIpRangeInternalRangeInUse Analytics
Affected Service Packages
Step 1: Replaying Mode Caution 🔴 Errors occurred during REPLAYING mode. Please check the build log for details. View the build log @dorianverna, @hao-nan-li VCR tests complete for 73a0de1! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 1a3aea1: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 4 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 build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @dorianverna, @hao-nan-li VCR tests complete for 1a3aea1! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit de2a49a: 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 build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @dorianverna, @hao-nan-li VCR tests complete for de2a49a! |
|
@hao-nan-li This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
/gcbrun |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit de2a49a: Diff reportYour PR generated the following diffs in downstream repositories:
Errors
Step 1: Replaying Mode Caution Build Failure during VCR tests 🔴 REPLAYING mode: The following packages failed to build:
Please fix the compilation errors to complete your PR. View the build log @dorianverna VCR tests complete for de2a49a! |
|
Reassign as I'll be OOO |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit a2aeba8: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 8 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 build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for a2aeba8! |
NickElliot
left a comment
There was a problem hiding this comment.
could you resolve the conflicts? thanks!
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 5e0759c: 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
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for 5e0759c! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 087d9a6: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for 087d9a6! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 50f050f: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for 50f050f! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c3f94b1: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for c3f94b1! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 03d94a8: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @dorianverna, @NickElliot, @hao-nan-li VCR tests complete for 03d94a8! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit ec9c564: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 1 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, @NickElliot, @hao-nan-li VCR tests complete for ec9c564! |
|
@NickElliot can you please take a look now? The latest IPv6 test introduced some conflicting changes, but I resolved them now. The integration test failure doesn't seem to be related to the change here. |
NickElliot
left a comment
There was a problem hiding this comment.
updating a few comment formattings for consistency, but otherwise LGTM! verified the test case adequately covers the scenario this update resolves.
Co-authored-by: Nick Elliot <nickelliot@google.com>
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 9f938e7: 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, @NickElliot, @hao-nan-li VCR tests complete for 9f938e7! |
5e9dd3c
Co-authored-by: Nick Elliot <nickelliot@google.com>
Co-authored-by: Nick Elliot <nickelliot@google.com>
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.
Issue: hashicorp/terraform-provider-google#27175
Tested:
Furter details:
Bug 1: Detaching/Deleting InternalRange (GHE Issue #27175)
The Problem: Terraform attempts to delete the google_network_connectivity_internal_range resource while the subnetwork still has it registered in GCP, resulting in a 400 Resource is already being used failure.
The Solution: Our internal_range_detach.go.tmpl custom delete code intercepts GCE's 400 error, safely extracts it (even when wrapped), matching by /internalRanges/ in a robust and project-independent way, and PATCHes the subnetwork to remove/detach the referencing secondary range.
Verified by: Step 2 of the acceptance test (testAccComputeSubnetwork_secondaryIpRangeInternalRangeRemoved) where the range is completely removed and the InternalRange is successfully destroyed.
Bug 2: Positional Stability
The Problem: Adding a new secondary range that sorts lexicographically before an existing range (or re-adding a range) triggers a positional shift diff in the TypeList schema, showing a "rename" at position 0 instead of a clean addition. In real-world, in-use subnets, this positional re-ordering fails to apply.
The Solution: This is resolved by the custom diff logic resourceComputeSubnetworkSecondaryIpRangeSetStyleDiff (already part of the subnetwork resource implementation). It calculates the difference and explicitly locks existing/surviving ranges to their old index slots, only appending new ranges to the remaining index gaps.
Verified by: Step 3 of the acceptance test (testAccComputeSubnetwork_secondaryIpRangePositionalStability) where a new range is added to the empty subnetwork, confirming that positional stability and range addition work perfectly.