-
Notifications
You must be signed in to change notification settings - Fork 388
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
Switch to using google.golang.org/protobuf rather than github.com/golang/protobuf #829
Switch to using google.golang.org/protobuf rather than github.com/golang/protobuf #829
Conversation
Welcome @ghakazian! |
Hi @ghakazian. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -38,6 +38,7 @@ require ( | |||
github.com/go-openapi/swag v0.22.3 // indirect | |||
github.com/gogo/protobuf v1.3.2 // indirect | |||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | |||
github.com/golang/protobuf v1.5.3 // indirect |
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.
This is still used here.
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.
Understood, it is still pulled in as an indirect dependency by a number of other components.
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.
@xing-yang Any chance this can be approved? I removed the explicit dependency on github.com/golang/protobuf; the remaining indirect reference comes from other components that still use github.com/golang/protobuf.
If I am missing other steps that I should do as part of this PR to remove the indirect dependency, please let me know. Thanks.
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.
Can you check who is making this indirect dep? You can try this "go mod why -m ".
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.
It looks like it is being pulled in by github.com/container-storage-interface/spec/lib/go/csi
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.
Thanks for checking!
/ok-to-test |
return "", "", time.Time{}, 0, false, err | ||
} | ||
|
||
creationTime := rsp.Snapshot.CreationTime.AsTime() |
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.
Any error check for this? Could "creationTime" be 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.
The AsTime() method returns a time.Time struct (not an interface or pointer) which cannot be nil, and since the method does not return an error, there is nothing to error check.
if err != nil { | ||
return false, time.Time{}, 0, err | ||
} | ||
creationTime := rsp.Entries[0].Snapshot.CreationTime.AsTime() |
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.
Same as above.
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.
Response same as above, AsTime() doesn't return a nillable type or an error to check.
t.Fatalf("Failed to convert timestamp to time: %v", err) | ||
} | ||
createTimestamp := timestamppb.Now() | ||
createTime := createTimestamp.AsTime() |
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.
Same as above.
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.
Response same as above, AsTime() doesn't return a nillable type or an error to check.
t.Fatalf("Failed to convert timestamp to time: %v", err) | ||
} | ||
createTimestamp := timestamppb.Now() | ||
createTime := createTimestamp.AsTime() |
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.
Same as above.
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.
Response same as above, AsTime() doesn't return a nillable type or an error to check.
@@ -38,6 +38,7 @@ require ( | |||
github.com/go-openapi/swag v0.22.3 // indirect | |||
github.com/gogo/protobuf v1.3.2 // indirect | |||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | |||
github.com/golang/protobuf v1.5.3 // indirect |
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.
Can you check who is making this indirect dep? You can try this "go mod why -m ".
@xing-yang Looking at output from |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ghakazian, xing-yang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR removes an explicit dependency on a deprecated package
Which issue(s) this PR fixes:
Fixes #804
Special notes for your reviewer:
This is my first K8s PR so any constructive criticism would be welcome. Thanks!
Does this PR introduce a user-facing change?: