🐛 Fix GCP network/subnetwork discovery not working + several crashes#6675
Merged
🐛 Fix GCP network/subnetwork discovery not working + several crashes#6675
Conversation
Contributor
imilchev
reviewed
Feb 25, 2026
imilchev
reviewed
Feb 25, 2026
5bc8a14 to
fef6604
Compare
There was a problem hiding this comment.
Critical compilation error in subnetwork fallback; missing nil checks in fallback paths
Additional findings (file/line not in diff):
- 🟡
providers/gcp/resources/compute.go:1371— Missing nil checks before accessing args["name"], args["region"], and args["projectId"]. If these keys are absent, this will panic with nil pointer dereference.
imilchev
reviewed
Feb 25, 2026
Member
Author
|
Regarding the bot review (CHANGES_REQUESTED):
|
Signed-off-by: Tim Smith <tsmith84@gmail.com>
This makes the discover actually work Signed-off-by: Tim Smith <tsmith84@gmail.com>
Signed-off-by: Tim Smith <tsmith84@gmail.com>
GetInstances() already enumerates all instances across all zones. If the instance isn't found in that list, a direct Get call won't find it either. Keep the fallback only for network/subnetwork init where it's needed for discovery and shared VPC scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few different issues here.