Skip to content
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

[go] Bump images, dependencies and versions to go 1.24.0 #129688

Merged
merged 5 commits into from
Feb 27, 2025

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Jan 17, 2025

What type of PR is this?

/kind feature
/hold

What this PR does / why we need it:

  • Bump images, dependencies and versions to go 1.24.0

Which issue(s) this PR fixes:

Part of kubernetes/release#3772

/assign @MadhavJivrajani @liggitt @puerco @xmudrii @Verolop
cc @kubernetes/release-managers

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Kubernetes is now built with go 1.24.0

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/release-eng Issues or PRs related to the Release Engineering subproject area/test sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 17, 2025
@cpanato
Copy link
Member Author

cpanato commented Jan 17, 2025

@liggitt
Copy link
Member

liggitt commented Jan 18, 2025

I was really hoping sig-storage / sig-windows would complete the sweep and update of windows symlink handling to complete our transition to go 1.23 before we moved on to go 1.24 :-/

Resolution of #129084 should be higher priority than go 1.24, in my opinion (which is tricky since the folks working on that are non-overlapping with the ones updating to go 1.24)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 6, 2025
@cpanato cpanato changed the title [go] Bump images, dependencies and versions to go 1.24rc1 [go] Bump images, dependencies and versions to go 1.24rc2 Feb 7, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2025
@cpanato cpanato changed the title [go] Bump images, dependencies and versions to go 1.24rc2 [go] Bump images, dependencies and versions to go 1.24rc3 Feb 10, 2025
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 11, 2025
@pohly
Copy link
Contributor

pohly commented Feb 26, 2025

you cna push to your branch and then i can cherry pick

https://github.com/kubernetes/kubernetes/compare/master...pohly:kubernetes:update-main-go124?expand=1

These suppressions are necessary to make golangci-lint 1.64 pass with the
current code base. This change is meant to be backported to release
branches. On master, we may want to revert some of it together with fixing the
findings.
@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

If they're not new checks which are newly failing with go 1.24, we should figure out why and decide whether to fix or disable the checks case-by-case.

Does it matter why we now get these issues reported? Isn't it more important whether they are real bugs that must be fixed?

I completely agree we should fix real issues. Understanding why they're newly reported would help us know if they are new issues related to the go 1.24 bump in some way that we should fix with this bump, rather than in a follow-up.

(and I agree the stylistic non-bug linting we should just ignore / suppress, likely forever)

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 26, 2025
@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

/lgtm
/approve

once CI is happy

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3be923904d98da3bdc4a4cc458967247d0140601

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, dims, liggitt

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2025
@pohly
Copy link
Contributor

pohly commented Feb 26, 2025

Understanding why they're newly reported would help us know if they are new issues related to the go 1.24 bump in some way that we should fix with this bump, rather than in a follow-up.

Ack.

We can ignore gocritic. All of the reported issue are stylistic and not regressions caused by Go 1.24.

We can ignore testifylint and ginkgolinter. I'm pretty sure these are enhanced checks and only occur in tests.

govet's printf check is new. We knew that the Go team decided to enable that by default and fixed some occurrences, but since then this one got added in 9b6ef25:

ERROR: test/e2e/node/mount_propagation.go:200:18: printf: non-constant format string in call to k8s.io/kubernetes/test/e2e/framework.Logf (govet)
ERROR: 		framework.Logf(enterKubeletMountNS)

That leaves govet's lostcancel:

ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:999:2: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 	cancelCtx, cancel = context.WithCancelCause(ctx)
ERROR: 	^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1004:1: lostcancel: this return statement may be reached without using the cancel var defined on line 999 (govet)
ERROR: }
ERROR: ^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1050:2: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 	cancelCtx, cancel = context.WithCancelCause(ctx)
ERROR: 	^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1062:1: lostcancel: this return statement may be reached without using the cancel var defined on line 1050 (govet)
ERROR: }
ERROR: ^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1115:2: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 	cancelCtx, cancel = context.WithCancelCause(ctx)
ERROR: 	^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1127:1: lostcancel: this return statement may be reached without using the cancel var defined on line 1115 (govet)
ERROR: }
ERROR: ^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1187:2: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 	cancelCtx, cancel = context.WithCancelCause(ctx)
ERROR: 	^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1201:1: lostcancel: this return statement may be reached without using the cancel var defined on line 1187 (govet)
ERROR: }
ERROR: ^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1265:3: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 		cancelCtx, cancel = context.WithCancelCause(ctx)
ERROR: 		^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1275:1: lostcancel: this return statement may be reached without using the cancel var defined on line 1265 (govet)
ERROR: }
ERROR: ^

I think that is because of added support for context.WithCancelCause. If I replace that with context.WithCancel on current master without this PR, I get the same warning:

ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1265:3: lostcancel: the cancel function is not used on all paths (possible context leak) (govet)
ERROR: 		cancelCtx, cancel = context.WithCancel(ctx)
ERROR: 		^
ERROR: staging/src/k8s.io/client-go/tools/cache/reflector_test.go:1275:1: lostcancel: this return statement may be reached without using the cancel var defined on line 1265 (govet)
ERROR: }
ERROR: ^

However, I'm not seeing anything in the Go release notes about this added support. Perhaps it was considered too minor to be mentioned.

@rajibmitra
Copy link
Member

@pohly maybe we can try adding defer cancel() after each context.

@pohly
Copy link
Contributor

pohly commented Feb 26, 2025

maybe we can try adding defer cancel() after each context.

Yes, that'll be in a follow-up.

@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

hmmm... same failure

Kubernetes e2e suite: [It] [sig-cli] Kubectl client Simple pod should contain last line of the log

{ failed [FAILED] Expected
<string>: failed to create fsnotify watcher: too many open files
to contain substring
<string>: EOF

@rajibmitra
Copy link
Member

hmmm... same failure

Kubernetes e2e suite: [It] [sig-cli] Kubectl client Simple pod should contain last line of the log
{ failed [FAILED] Expected
<string>: failed to create fsnotify watcher: too many open files
to contain substring
<string>: EOF

@liggitt is there any way we could increase the ulimit ?

@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

@liggitt is there any way we could increase the ulimit ?

I'm more interested in knowing why go 1.24 exacerbates the failure than working around it

@rajibmitra
Copy link
Member

@liggitt is there any way we could increase the ulimit ?

I'm more interested in knowing why go 1.24 exacerbates the failure than working around it

Imho, once we have this in place #129688 (comment) , go 1.24 should stop complaining, seems like latest one is stricter.

@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

Imho, once we have this in place #129688 (comment) , go 1.24 should stop complaining, seems like latest one is stricter.

hrmm, but were any of the flagged locations relevant to the e2e test that's failing? I thought those were mostly in unit test locations we didn't care about

@liggitt
Copy link
Member

liggitt commented Feb 26, 2025

/hold
/retest

(seeing how many identical failures we get, not 100% sure we're ok with merging with this level of failure yet)

@rajibmitra
Copy link
Member

Imho, once we have this in place #129688 (comment) , go 1.24 should stop complaining, seems like latest one is stricter.

hrmm, but were any of the flagged locations relevant to the e2e test that's failing? I thought those were mostly in unit test locations we didn't care about

not sure of the locations, but i can quickly raise a PR that fixes the context test cases against master branch.

@liggitt
Copy link
Member

liggitt commented Feb 27, 2025

yeah, the failing test is regularly failing in CI periodics already - https://storage.googleapis.com/k8s-triage/index.html?text=failed%20to%20create%20fsnotify%20watcher%3A%20too%20many%20open%20files

we need an open issue for the test / component owner to resolve that pretty quickly

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2025
@k8s-ci-robot
Copy link
Contributor

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

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-gce 650db7f link unknown /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@liggitt
Copy link
Member

liggitt commented Feb 27, 2025

/retest

@k8s-ci-robot k8s-ci-robot merged commit b8c95e1 into kubernetes:master Feb 27, 2025
21 of 22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 27, 2025
@cpanato cpanato deleted the update-main-go124 branch February 27, 2025 17:32
@cpanato
Copy link
Member Author

cpanato commented Feb 27, 2025

nice!

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/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kube-proxy area/kubectl area/kubelet area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.
Projects
Status: Closed / Done
Status: Done
Development

Successfully merging this pull request may close these issues.