Skip to content

chore: Upgrade Go toolchain to 1.25.x#1689

Merged
SpencerTorres merged 1 commit intomainfrom
kavirajk/update-go-toolchain
Oct 22, 2025
Merged

chore: Upgrade Go toolchain to 1.25.x#1689
SpencerTorres merged 1 commit intomainfrom
kavirajk/update-go-toolchain

Conversation

@kavirajk
Copy link
Copy Markdown
Contributor

@kavirajk kavirajk commented Oct 16, 2025

Summary

Main goal is to be able to use synctest package to capture some goroutine leaks bugs

It is experemental in v1.24 and becomes part of standard library in v1.25.
https://go.dev/blog/synctest

So that we remove build tags from this these tests.
https://github.com/ClickHouse/clickhouse-go/pull/1688/files#r2435808409

Checklist

Delete items not relevant to your PR:

Main goal is to be able to use `synctest` package to capture some
goroutine leaks bugs

It is experemental in v1.24 and becomes part of standard library in
v1.25.
https://go.dev/blog/synctest

Signed-off-by: Kaviraj <[email protected]>
@kavirajk kavirajk marked this pull request as ready for review October 16, 2025 12:54
Copy link
Copy Markdown
Member

@SpencerTorres SpencerTorres left a comment

Choose a reason for hiding this comment

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

Curious how this may affect users on 1.24. We can revert if needed, but it should be fine

@SpencerTorres SpencerTorres merged commit 4c733f3 into main Oct 22, 2025
14 checks passed
@erka
Copy link
Copy Markdown

erka commented Nov 22, 2025

@kavirajk Is there any particular reason this is set to 1.25.3 rather than 1.25.0?

@bobrik
Copy link
Copy Markdown

bobrik commented Nov 22, 2025

I don't think it even needs to be 1.25 here. Having 1.25.3 pushes every dependent module to that version, while synctest presumably is only needed by clickhouse-go test suite, so GOEXPERIMENT=synctest should be sufficient.

@kavirajk
Copy link
Copy Markdown
Contributor Author

Ah I see. didn't know it would be too much problem. May be it's worth keeping it at 1.24 for a bit? (with GOEXPERIMENT=synctest).

@bobrik
Copy link
Copy Markdown

bobrik commented Nov 24, 2025

Yes, I think that would be the right thing to do.

The only reason I noticed is because I bumped clickhouse-go in Grafana's Alloy, which bumped the minimum version and invalidated all the caches and made me wait a very long time for it to recompile everything.

vincentbernat added a commit to vincentbernat/clickhouse-go that referenced this pull request Nov 24, 2025
In ClickHouse#1689, Go minimal version was bumped to 1.25.3, preventing usage by
earlier versions of Go, notably 1.24.x. This is not needed as the test
using synctest is protected by a build constraint, so it works just
fine.

In this PR, the toolchain is set to 1.25.4, such that most people
hacking on this package will use Go 1.25. However, for test workflows,
we use GOTOOLCHAIN=local to respect the target Go version. This last bit
can be removed with actions/setup-go@v6 as it will set GOTOOLCHAIN=local
itself.

We could also not set the toolchain at all in go.mod. It would work too.

The alternative to set GOEXPERIMENT=synctest does not work as the API of
this package was modified between 1.24 and 1.25.
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.

4 participants