-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Bump Kube API Linter version #12974
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
Conversation
|
Let's have a separate PR to bump golangci-lint |
|
KAL uses golangci-lint v2.5.0 as dependency, so we should upgrade same version at least. |
|
/retest |
KAL should have no dependency to the golangci-lint version we use in the action as far as I'm aware? It's an entirely separate binary (see Makefile: GOLANGCI_LINT_KAL) |
|
Agreed, we shouldn't necessarily need to bump the golangci-lint version just because that's what KAL is using in its go.mod. For the custom-gcl version that is being used here, that codepath only minimally depends on golangci-lint (registry import) and as such I would expect any v2.X to be fine (else someone merged something breaking) Are you being forced to upgrade @sivchari ? |
|
@JoelSpeed I think it's even more. I think KAL has 0 dependency on the golangci-lint binary we use in the action? It should be built entirely independent of that. Or am I missing something? |
|
The below is the log which I tried to run KAL depends on golangci-lint v2.5.0, and golangci-lint v2.5.0 upgrades version about embeddedstructfieldcheck in this. These upgrades change definition from |
|
Just to avoid misunderstandings. I'm suggesting to revert the change to .github/workflows/pr-golangci-lint.yaml but keep the one in hack/tools/.custom-gcl.yaml. It's entirely unclear to me how the version number in .github/workflows/pr-golangci-lint.yaml would influence the build of the KAL binary. These should be 100% independent as far as I can tell |
|
For me make lint-api works when I change .github/workflows/pr-golangci-lint.yaml to v2.4.0. (I know it seems unimportant, but I would like to figure out if we really have to keep our regular golangci-lint and KAL 100% in sync, which would be very annoying) |
Signed-off-by: sivchari <[email protected]>
|
The lint CI was passed, so the problem seems to be happened in only my environment. Sorry. |
|
I just tried it again and it worked. It might have been conflicting with something in another branch. The reason isn't clear, though. |
Yes, as long as the environment running the KAL custom binary build has some version of golangci-lint V2, it doesn't matter that what's in the custom matches what's in the workflow |
|
Ah is the KAL custom binary using golangci-lint from the path? I always assumed that this is a standalone binary |
|
We call IMO we probably want to switch to the go plugin version (many others are) but that then also depends on the version of golangci-lint in the path. We could also look at building from the |
| - kubeapilinter | ||
| - path: "api/addons/v1beta2|api/bootstrap/kubeadm/v1beta2|api/controlplane/kubeadm/v1beta2|api/core/v1beta2|api/ipam/v1beta2|api/runtime/v1beta2" | ||
| text: "ssatags: Conditions should have a listType marker for proper Server-Side Apply behavior" | ||
| text: "ssatags: .*Conditions should have a listType marker for proper Server-Side Apply behavior" |
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 as an aside, why didn't we add list type atomic to these? Because it conflicts with the expectations of the conditions linter I expect?
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.
I think for this exclude here we didn't want to take any risk making a change to the deprecated condition field at this point.
These fields will be removed in the foreseeable future anyway.
For the new condition fields we want to support co-ownership
|
If there are something that I need to do, please let me know (I think it seems to be ready to merge) |
|
All good. Thx! /lgtm Might be also nice to be able to just consume KAL as a binary instead of compiling it ourselves |
|
LGTM label has been added. Git tree hash: 001ab65ab32d06529b24afc890c4aed657601efb
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
What this PR does / why we need it:
Bump Kube API Linter version, then the latest KAL changes its output format, so I updated configuration to ignore as is.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Part of #11967