Skip to content

Bump Go toolchain to v1.25.8#6161

Open
mboersma wants to merge 3 commits intokubernetes-sigs:mainfrom
mboersma:bump-go-v1.25
Open

Bump Go toolchain to v1.25.8#6161
mboersma wants to merge 3 commits intokubernetes-sigs:mainfrom
mboersma:bump-go-v1.25

Conversation

@mboersma
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Updates the Go toolchain to v1.25.8 and bumps golang.org/x/net and the Trivy scanner.

The weekly security scan GH action broke, because:

  • Trivy v0.64.0 is no longer available
  • A vulnerability was found in golang.org/x/net v0.50.0
  • Several vulnerabilities exist in Go v1.24.x (which won't be updated)

Which issue(s) this PR fixes:

See weekly security scan

Special notes for your reviewer:

While we try to stick with the Go toolchain used by the CAPI release we import, it should be safe to move forward here. CAPI's main branch made these same changes.

I verified locally that CAPZ has a clean bill of health after this:

% make clean verify-security
...
Report Summary

┌─────────────────────────────────────────────────────────────────────────────┬──────────┬─────────────────┬─────────┐
│                                   Target                                    │   Type   │ Vulnerabilities │ Secrets │
├─────────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
│ gcr.io/k8s-staging-cluster-api-azure/cluster-api-azure-controller-arm64:dev │  debian  │        0        │    -    │
│ (debian 13.3)                                                               │          │                 │         │
├─────────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┼─────────┤
│ manager                                                                     │ gobinary │        0        │    -    │
└─────────────────────────────────────────────────────────────────────────────┴──────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)


Check container images passed! No vulnerability found
GOBIN=/Users/matt/projects/cluster-api-provider-azure/hack/tools/bin ./scripts/go_install.sh golang.org/x/vuln/cmd/govulncheck govulncheck v1.1.4
/Users/matt/projects/cluster-api-provider-azure/hack/tools/bin/govulncheck-v1.1.4 ./... && R1=$? || R1=$?; \
        /Users/matt/projects/cluster-api-provider-azure/hack/tools/bin/govulncheck-v1.1.4 -C "hack/tools" ./... && R2=$? || R2=$?; \
        /Users/matt/projects/cluster-api-provider-azure/hack/tools/bin/govulncheck-v1.1.4 -C "" ./... && R3=$? || R3=$?; \
        if [ "$R1" -ne "0" ] || [ "$R2" -ne "0" ] || [ "$R3" -ne "0" ]; then \
                exit 1; \
        fi
No vulnerabilities found.
No vulnerabilities found.
No vulnerabilities found.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Mar 11, 2026
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 11, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mboersma for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 11, 2026
@mboersma
Copy link
Contributor Author

Linters are failing--maybe we need to merge #6078 first?

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.43%. Comparing base (aa8af32) to head (3b49bc8).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6161   +/-   ##
=======================================
  Coverage   44.43%   44.43%           
=======================================
  Files         280      280           
  Lines       25367    25367           
=======================================
  Hits        11272    11272           
  Misses      13283    13283           
  Partials      812      812           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@k8s-ci-robot
Copy link
Contributor

@mboersma: 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
pull-cluster-api-provider-azure-test 3b49bc8 link true /test pull-cluster-api-provider-azure-test
pull-cluster-api-provider-azure-verify 3b49bc8 link true /test pull-cluster-api-provider-azure-verify
pull-cluster-api-provider-azure-e2e-aks 3b49bc8 link true /test pull-cluster-api-provider-azure-e2e-aks

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.

Details

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.

module sigs.k8s.io/cluster-api-provider-azure

go 1.24.6
go 1.25.0
Copy link
Member

Choose a reason for hiding this comment

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

Could we please hold off bumping this until a CAPZ release with CAPI 1.12 is out?
CAPI 1.12 is matched with Go 1.24: https://github.com/kubernetes-sigs/cluster-api/blob/1a1852c74072febc3fbf9823c9dd32f4cd6cc747/go.mod#L3

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe CAPI just forgot to do that. k/k has been using 1.25 since long ago. If we don't want to keep aligned with k/k, at lease can we set gotoolchain=auto to unblock the builds?
kubernetes-sigs/cloud-provider-azure#9930

Copy link
Member

Choose a reason for hiding this comment

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

I don't think core CAPI forgot to do that.
My understanding is that Core CAPI matches a specific k/k version in go.mod.

In the case of CAPI 1.12 it matches k/k 0.34 libs and, go 1.24 as that's what k/k 1.34 is based off of https://github.com/kubernetes/kubernetes/blob/ebfac057369b21558006b8815821ab2fb1e29f2d/go.mod#L9

When CAPI 1.13 will be out, it'll will be based off of k/k 0.35 libs (which use go 1.25) so the overall go directive will become 1.25 (you can already see this in CAPI main here and here).

Hence given:

CAPZ 1.22.z (already released) is based off:

I am expecting CAPZ 1.23.0 will be based off of:

at lease can we set gotoolchain=auto to unblock the builds?

Better to check with @mboersma about this. Downstream we use gotoolchain=local for reproducible builds, not sure if there are such constraints here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/hold

Yes, we try to stick with the Go compiler used for the version of CAPI we have vendored into CAPZ. Sometimes that means we lag far behind the current Go release and we get tagged for CVEs that are only fixed in the current Go toolchain.

But let's hold off on this until we release CAPZ 1.23, which should be any day now.

Copy link
Member

Choose a reason for hiding this comment

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

Ack, thanks for confirming

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants