-
Notifications
You must be signed in to change notification settings - Fork 554
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
build: update Go 1.23 #5036
base: devel
Are you sure you want to change the base?
build: update Go 1.23 #5036
Conversation
310a0c1
to
ddac84b
Compare
golangci-lint gettting killed unexpectedly
trying with latest version of golangci-lint |
c1c9e27
to
d7b37d4
Compare
Signed-off-by: Praveen M <[email protected]>
d7b37d4
to
47fc5b0
Compare
updating golangci-lint to latest produces many lint issues - log updating golangci-lint to minimum version supported by Go v1.23 |
47fc5b0
to
6acc44c
Compare
Magic number used be ignored earlier. Static check for arg order is likely something added in the new releases of golangci-lint? If so we can exclude them in |
Okay, I'll ignore the magic number for now. Also, there are other lint failures - gosec, staticcheck, govet Thanks for taking a look. |
Actually the gomnd is replaced with mnd |
b203cc1
to
4876657
Compare
ee5dc32
to
898cb40
Compare
Fixes like you have in rbd: fix arguments have the wrong order (staticcheck) can also be sent as separate PR to make reviewing of this one easier. You can leave the error/warning from golangci-lint in the PR description. |
Sounds good to me, I'll open up a new PR to fix the golangci-lint errors. |
f175130
to
5ba7034
Compare
Hey @nixpanic, I tried to include the golangci-lint changes in this PR. |
@iPraveenParihar , disabling only gosec rule G115 should be possible too? If you do that, make sure to open an issue for it so we can track it down later once gosec reports fewer false negatives. |
666bcdf
to
8aee62e
Compare
Created a issue for it - #5040 |
- gomnd is replaced by mnd in v1.58.0 - gosec exlcude G115 rule (Potential integer overflow when converting between integer types) - disable new iface linter - disable new recvcheck linter Signed-off-by: Praveen M <[email protected]>
Signed-off-by: Praveen M <[email protected]>
Signed-off-by: Praveen M <[email protected]>
Signed-off-by: Praveen M <[email protected]>
Signed-off-by: Praveen M <[email protected]>
8aee62e
to
c1ee4a5
Compare
@@ -1580,10 +1580,10 @@ func k8sVersionGreaterEquals(c kubernetes.Interface, major, minor int) bool { | |||
// return value. | |||
} | |||
|
|||
maj := strconv.Itoa(major) | |||
min := strconv.Itoa(minor) | |||
_maj := strconv.Itoa(major) |
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 rather ugly, not only because of the added _
, also because comparing versions as a string.
Maybe it makes more sense to convert v.Major
and v.Minor
to integers?
@@ -768,7 +768,7 @@ var _ = Describe(cephfsType, func() { | |||
for i := range deplPods { | |||
err = ensureStatSucceeds(deplPods[i].Name) | |||
if err != nil { | |||
framework.Failf(err.Error()) | |||
framework.Failf("%v", err.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.
a bit more context in the errors would help here.
framework.Failf("ensureStatSucceeds failed for pod %q: %v", deplPods[i].Name, err.Error())
Something like that really helps the person receiving the error a lot. These things can/should be done everywhere.
Describe what this PR does
-build: update Go 1.23
Fixes: #5015
Checklist:
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>
: retest the<job-name>
after unrelatedfailure (please report the failure too!)