-
Notifications
You must be signed in to change notification settings - Fork 425
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
✨ Bump to k8s.io v1.24.0-rc.1 #666
✨ Bump to k8s.io v1.24.0-rc.1 #666
Conversation
/assign @alvaroaleman |
/test pull-controller-tools-test-master |
545c232
to
5b698c0
Compare
pkg/version/version.go
Outdated
@@ -23,7 +23,7 @@ import ( | |||
// Version returns the version of the main module | |||
func Version() string { | |||
info, ok := debug.ReadBuildInfo() | |||
if !ok { | |||
if !ok || (info != nil && info.Main.Version == "") { |
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.
A unit test failed without this change
It looks like previously ok was false. Now we get ok==true + an info object with an empty Version
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.
okay, interesting. That is IMHO a go bug as it breaks compatibility.
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.
Shouldn't it be
if !ok || (info != nil && info.Main.Version == "") { | |
if !ok || info == nil || info.Main.Version == "" { |
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.
Fixed
Maybe the func still behaves the same way but the tests are now built with module support ?!
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.
see #662 for explanation for this issue
Signed-off-by: Stefan Büringer [email protected]
5b698c0
to
633a769
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, sbueringer 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 |
/lgtm |
Signed-off-by: Stefan Büringer [email protected]