Skip to content

Conversation

@farazkhawaja
Copy link
Contributor

@farazkhawaja farazkhawaja commented Sep 27, 2025

Upgrades go version to 1.25
ran go mod tidy on suc/ and suc/pkg/apis folder
ran golangci-lint migrate to migrate golangci config to v2

@brandond
Copy link
Member

needs rebase

farazkhawaja and others added 3 commits September 30, 2025 21:50
Signed-off-by: Khwaja Faraz Ahmed <khwaja.ahmed@securiti.ai>
@brandond
Copy link
Member

it looks like some modules will need updates to work with go 1.25

Signed-off-by: Khwaja Faraz Ahmed <khwaja.ahmed@securiti.ai>
@brandond
Copy link
Member

brandond commented Oct 5, 2025

I think you may need to also run go generate if you're updating the controller-gen version.

Signed-off-by: Khwaja Faraz Ahmed <khwaja.ahmed@securiti.ai>
@farazkhawaja
Copy link
Contributor Author

@brandond did the CI timeout?

@brandond
Copy link
Member

brandond commented Oct 9, 2025

There are regressions (golang/go#75828) in the most recent upstream golang patch releases, we're going to wait for those to be addressed and then we can update again.

module github.com/rancher/system-upgrade-controller

go 1.24.6
go 1.25.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brandond go 1.25.3 just released. should i change this line from go 1.25.0 to go 1.25.3 . toolchain needs to be changed aswell right?

Copy link
Member

@brandond brandond Oct 14, 2025

Choose a reason for hiding this comment

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

The bci/golang:1.25 hardcodes GOTOOLCHAIN env var to whatever patch version is in the image. That said, the new patch release isn't available from BCI yet:

brandond@dev01:~$ docker run registry.suse.com/bci/golang:1.25 go version
go version go1.25.2 linux/amd64

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PS C:\Users\pc\Desktop> docker run registry.suse.com/bci/golang:1.25 go version
go version go1.25.2 linux/amd64

@brandond is there any action item from our side to push for 1.25.3?

Choose a reason for hiding this comment

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

fyi; BCI got go 1.25.3

hammad.saeedi@Hammads-MacBook-Pro % docker run registry.suse.com/bci/golang:1.25 go version
go version go1.25.3 linux/arm64

@farazkhawaja
Copy link
Contributor Author

@brandond

Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

Thanks for sticking with it!

Running: golangci-lint
Error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.25.1)
Failed executing command with error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.25.1)
time="2025-11-06T19:42:01Z" level=fatal msg="exit status 3"

need to bump golangci-lint as well, for golang 1.25 compat.

@farazkhawaja
Copy link
Contributor Author

@brandond we're using v1.64.8 and thats the latest 1.x.x version released by golangci. moving to 2.x.x would mean a major version bump. Do we wanna proceed with that?

@brandond
Copy link
Member

brandond commented Nov 8, 2025

Yes, we will need to switch to 2.4 if we want to use go 1.25.

Signed-off-by: Faraz Khawaja <khwajafarazahmed@yahoo.com>
@brandond
Copy link
Member

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions

You can't just bump the golangci-lint version, you need to migrate the config from v1 -> v2 as well :/

Signed-off-by: Khwaja Faraz Ahmed <khwaja.ahmed@securiti.ai>
@farazkhawaja
Copy link
Contributor Author

@brandond can you kickoff the pipeline again

Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

one change. lgtm otherwise!

@brandond brandond merged commit 8271c14 into rancher:master Nov 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants