-
Notifications
You must be signed in to change notification settings - Fork 549
Update KAL and GolangCI-Lint to v2 #2321
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
base: master
Are you sure you want to change the base?
Conversation
Hello @JoelSpeed! Some important instructions when contributing to openshift/api: |
go 1.23.0 | ||
go 1.24.2 | ||
|
||
toolchain go1.24.3 |
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.
We currently don't have 1.24 images, do we?
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.
Doesn't look like it :).
Do we have an ETA on when we would have them? I'm assuming we will need to have them before the next kube rebase since kube-api-linter should be following the same Go version as upstream kube
2f575e6
to
8b611b8
Compare
8b611b8
to
70ffd28
Compare
- nobools | ||
- nomaps | ||
- statussubresource | ||
lintersConfig: |
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 add a configuration for the new uniquemarkers
linter to prevent duplicate feature-gate markers on fields and types?
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.
Yes we should, will need to work out what the appropriate configuration is for that 🤔
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.
Overall LGTM. Only a single comment on potentially configuring the new uniquemarkers
linter to enforce uniqueness on some of our custom markers, but that could always be a smaller, focused follow-up if you just want to get this in as-is.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: everettraven, JoelSpeed 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 |
@JoelSpeed: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
This updates golangci-lint to v2, and moves KAL to use the Go plugin method that we are using on K/K, and then applies a handful of safe fixes produced by the linter.
The fixes are predominantly adding missing
optional
tags to fields or removing duplicates or removing required/optional from type declarations where they shouldn't actually exist