Skip to content

Bump to Go 1.25 and apply automated fixes (go fix)#355

Merged
kubernetes-prow[bot] merged 10 commits into
kubernetes:masterfrom
skitt:go-fix
Jul 7, 2026
Merged

Bump to Go 1.25 and apply automated fixes (go fix)#355
kubernetes-prow[bot] merged 10 commits into
kubernetes:masterfrom
skitt:go-fix

Conversation

@skitt

@skitt skitt commented Jul 6, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This bumps to Go 1.25, which is the oldest version used by currently-supported k/k branches.

It also applies all automated go fix fixes; the commits before the 1.25 bump are valid for Go 1.23, those after it require Go 1.25. The main purpose of this is to set a baseline so that go fix can be used in future PRs (for example with go:inline directives).

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

NONE

skitt added 7 commits July 6, 2026 13:40
This is easier to read and can avoid a loop variable.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
This produces surprising results in tests: go-spew outputs "interface
{}", so the tests specify "any" but verify "interface {}".

Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
@kubernetes-prow kubernetes-prow Bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 6, 2026
@kubernetes-prow kubernetes-prow Bot requested review from apelisse and cofyc July 6, 2026 11:58
@kubernetes-prow kubernetes-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 6, 2026
@skitt

skitt commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

/cc @dims

@kubernetes-prow kubernetes-prow Bot requested a review from dims July 6, 2026 12:01
@skitt skitt force-pushed the go-fix branch 4 times, most recently from dc9b99c to e285858 Compare July 6, 2026 12:14
skitt added 3 commits July 6, 2026 14:19
This is the version used by the oldest Kubernetes branch we still
support (1.34).

golangci-lint 2.4.0 is the oldest version supporting Go 1.25. This
requires bumping golangci-lint-action and changing the command-line;
gofmt is disabled because it's a formatter, not a linter (and
golangci-lint now distinguishes between the two), and revive is
disabled because it mandates more documentation. This should be
addressed later.

Building with Go 1.25 requires fixing a couple of non-constant format
string stragglers.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Comment thread dump/dump_test.go
{map[string]int{}, "(map[string]int) {\n}\n"},
{map[string]int{"one": 1}, "(map[string]int) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"},
{map[string]interface{}{"one": 1}, "(map[string]interface {}) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"},
{map[string]any{"one": 1}, "(map[string]interface {}) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go-spew doesn’t know about any

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

@dims

dims commented Jul 7, 2026

Copy link
Copy Markdown
Member

/approve
/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, skitt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2026
@kubernetes-prow kubernetes-prow Bot merged commit cf1189d into kubernetes:master Jul 7, 2026
14 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants