-
Notifications
You must be signed in to change notification settings - Fork 21
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
🐛 Safeguard GCP connection in gcp init resources. #4278
Conversation
Signed-off-by: Preslav <[email protected]>
8d0c0b2
to
3bb4546
Compare
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.
Just curious: What happened that we need this now?
conn := runtime.Connection.(*connection.GcpConnection) | ||
conn, ok := runtime.Connection.(*connection.GcpConnection) | ||
if !ok { | ||
return nil |
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.
Should we extend this func to also return an error
?
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.
There are already code paths in the same func that return nil (when no matching platform exists) so I assume returning nil here would be ok too
Using a GCP/Azure/AWS snapshot connection right now is a bit weird: We use the GCP provider and we return a file system connection. There are some query filters that do query GCP resources, e.g. |
Thanks for the explanation. That's really wired. |
No description provided.