Skip to content

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Apr 11, 2025

Golangci-lint has released a new major version that includes some changes to how it is configured, along with the usual linter updates that come with every release.

This updates the golangci-lint version we use to v2.3.1 (the current latest release) and updates the config file to conform to the new format. Also includes quite a few trivial updates to address the new warnings from the updated linters.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stmcginnis

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

@k8s-ci-robot k8s-ci-robot added area/provider/docker Issues or PRs related to docker area/provider/nerdctl Issues or PRs related to nerdctl approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/podman Issues or PRs related to podman size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 11, 2025
@k8s-ci-robot k8s-ci-robot requested a review from aojea April 11, 2025 14:23
@aojea
Copy link
Contributor

aojea commented Apr 12, 2025

github actions runners have bug in the kernel

2025-04-11T14:24:57.741538117Z stderr F 	ip6tables-restore v1.8.9 (nf_tables): unknown option "--xor-mark"
2025-04-11T14:24:57.741540752Z stderr F 	Error occurred at line: 22
2025-04-11T14:24:57.741543337Z stderr F 	Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
2025-04-11T14:24:57.741546342Z stderr F  > ipFamily="IPv6"

actions/runner-images#11985

@BenTheElder
Copy link
Member

something broke badly with a number of the actions, we're going to have to get that fixed

@BenTheElder
Copy link
Member

ok so it's the ones on 22.04, ip6tables is broken there

@BenTheElder
Copy link
Member

we can bypass the actions, they're not relevant to only bumping golangci-lint

I want to run it again now that .go-version is on 1.22 though
/test pull-kind-verify
/test pull-kind-test

@BenTheElder
Copy link
Member

BenTheElder commented Apr 29, 2025

@stmcginnis can you rebase (picks up actions fixes :/) and go mod tidy again? Thanks!

@stmcginnis
Copy link
Contributor Author

Sorry, this had dropped off my radar. Will get rebased and updated.

The Go 1.25 release reminded me of this. Saw this nice update in the release notes:

When the go command updates the go line in a go.mod or go.work file, it no longer adds a toolchain line specifying the command’s current version.

@stmcginnis stmcginnis changed the title Update golangci-lint to v2.0.2 Update golangci-lint to v2.3.1 Aug 13, 2025
@BenTheElder
Copy link
Member

When the go command updates the go line in a go.mod or go.work file, it no longer adds a toolchain line specifying the command’s current version.

Yeah! 🎉 , been waiting on this bug.

I think, it might even be something to consider soonish as 1.21+ becomes available in stable / LTS distros to leverage this, but we probably don't want it writing in the current version every time we touch go mod ...

@BenTheElder
Copy link
Member

we might have to hold a little on 1.25, runc for example can be slightly sensitive to go upgrades, I haven't checked into that yet

Golangci-lint has released a new major version that includes some
changes to how it is configured, along with the usual linter updates
that come with every release.

This updates the golangci-lint version we use to v2.3.1 (the current
latest release) and updates the config file to conform to the new
format. Also includes quite a few trivial updates to address the new
warnings from the updated linters.

Signed-off-by: Sean McGinnis <[email protected]>
@BenTheElder
Copy link
Member

Kubernetes/Kubernetes is also still not updated, I do want to leverage 1.25 though 😅

We're going to have go keep an eye out for our controllers attempting to become cgroup aware in the weird nested cgroup environment 🙃

@stmcginnis
Copy link
Contributor Author

we might have to hold a little on 1.25

Is there a reason to hold on this until 1.25 is in use?

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. area/provider/docker Issues or PRs related to docker area/provider/nerdctl Issues or PRs related to nerdctl area/provider/podman Issues or PRs related to podman cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants