Skip to content

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JoelSpeed
Copy link
Contributor

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

Copy link
Contributor

openshift-ci bot commented May 15, 2025

Hello @JoelSpeed! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 15, 2025
@openshift-ci openshift-ci bot requested review from bparees and everettraven May 15, 2025 09:04
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2025
go 1.23.0
go 1.24.2

toolchain go1.24.3
Copy link
Member

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?

Copy link
Contributor

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

- nobools
- nomaps
- statussubresource
lintersConfig:
Copy link
Contributor

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?

Copy link
Contributor Author

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 🤔

Copy link
Contributor

@everettraven everettraven left a 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.

Copy link
Contributor

openshift-ci bot commented Jun 12, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jun 12, 2025

@JoelSpeed: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn 70ffd28 link true /test e2e-aws-ovn
ci/prow/e2e-aws-serial-techpreview-2of2 70ffd28 link true /test e2e-aws-serial-techpreview-2of2
ci/prow/e2e-upgrade-out-of-change 70ffd28 link true /test e2e-upgrade-out-of-change
ci/prow/e2e-azure 70ffd28 link false /test e2e-azure
ci/prow/lint 70ffd28 link true /test lint

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants