Skip to content

update minimum go version to go1.23#49541

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:bump_go_version
Mar 5, 2025
Merged

update minimum go version to go1.23#49541
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:bump_go_version

Conversation

@thaJeztah
Copy link
Member

Go maintainers started to unconditionally update the minimum go version for golang.org/x/ dependencies to go1.23, which means that we'll no longer be able to support any version below that when updating those dependencies;

all: upgrade go directive to at least 1.23.0 [generated]

By now Go 1.24.0 has been released, and Go 1.22 is no longer supported
per the Go Release Policy (https://go.dev/doc/devel/release#policy).

For golang/go#69095.

This updates our minimum version to go1.23, as we won't be able to maintain compatibility with older versions because of the above.

- Human readable description for the release notes

Go SDK: Update minimum required Go version to go1.23

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

Interesting failure (on Linux / Ubuntu);

#124 exporting to docker image format
#124 ERROR: failed to copy: GET https://productionresultssa1.blob.core.windows.net/actions-cache/2ce-15325802
--------------------------------------------------------------------------------
RESPONSE 503: 503 The server is busy.
ERROR CODE: ServerBusy
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>The server is busy.
RequestId:4bd3d70f-601e-006f-4c70-879277000000
Time:2025-02-25T10:30:53.3094510Z</Message></Error>
--------------------------------------------------------------------------------

------
 > exporting to docker image format:
------
ERROR: failed to solve: failed to copy: GET https://productionresultssa1.blob.core.windows.net/actions-cache/2ce-15325802
--------------------------------------------------------------------------------
RESPONSE 503: 503 The server is busy.
ERROR CODE: ServerBusy
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>The server is busy.
RequestId:4bd3d70f-601e-006f-4c70-879277000000
Time:2025-02-25T10:30:53.3094510Z</Message></Error>
--------------------------------------------------------------------------------

@thaJeztah
Copy link
Member Author

Don't merge this one yet; we only need this if #49543 would fix an actual issue; it's quite likely that the CVEs fixed there are not affecting our code, and if they would show up only a false positive in security scanners.

We would need this at some point, but could possibly do so in a v28.1.0 release, not necessarily v28.0.1

@tianon
Copy link
Member

tianon commented Feb 26, 2025

"Thanks Gobama"

@thaJeztah thaJeztah self-assigned this Feb 26, 2025
@thaJeztah thaJeztah force-pushed the bump_go_version branch 2 times, most recently from 49b485c to da3ca0b Compare March 4, 2025 08:43
@thaJeztah
Copy link
Member Author

FWIW, I reduced this to ONLY the vendor.mod and will open a follow-up to change the //go:build tags.

The vendor.mod changes shouldn't impact users of our code (because it's not a go.mod yet so ignored elsewhere), whereas the //go:build tags will.

We need the vendor.mod changes for our own vendoring to work correctly, but the //go:build tags are not yet strictly needed; updating then is purely to would make them match the minimum required for the module as a whole.

@thaJeztah
Copy link
Member Author

As to "why this in a separate PR?" - that's mostly because I don't want such changes to be hidden in some "update some dependencies" PR; I prefer them to be very visible to make them stand out a bit more 😅

@austinvazquez
Copy link
Contributor

If maintaining the release branches wasn't hard enough, now for backports a toolchain upgrade will almost certainly be required.

@tianon
Copy link
Member

tianon commented Mar 4, 2025

Is there an issue filled somewhere asking the project to reconsider these automated minimum version bumps?

@thaJeztah
Copy link
Member Author

@tianon I haven't opened a ticket, but left comments on the related proposal; knowing the Go maintainer's usual flow, I expect a ticket to be closed with "likely reject"; their motivation was fuzzy at least; mostly "because it's easier to have a bot do it" and "who knows, we might want to use some cool new Go features" golang/go#69095 (comment)

Go maintainers started to unconditionally update the minimum go version
for golang.org/x/ dependencies to go1.23, which means that we'll no longer
be able to support any version below that when updating those dependencies;

> all: upgrade go directive to at least 1.23.0 [generated]
>
> By now Go 1.24.0 has been released, and Go 1.22 is no longer supported
> per the Go Release Policy (https://go.dev/doc/devel/release#policy).
>
> For golang/go#69095.

This updates our minimum version to go1.23, as we won't be able to maintain
compatibility with older versions because of the above.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

LGTM, but "under protest" (of Go's weird decisions constantly forcing everyone to make bad compromises)

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

This seems reasonable

@thaJeztah
Copy link
Member Author

Thanks! Let me bring this one in, so that we can look at updating those dependencies.

I'll also dust off the original changes to update the //go:build tags, but I can leave that one in draft for now.

@thaJeztah thaJeztah merged commit f049fd0 into moby:master Mar 5, 2025
150 checks passed
@thaJeztah thaJeztah deleted the bump_go_version branch March 5, 2025 19:36
@thaJeztah thaJeztah added this to the 28.0.2 milestone Mar 5, 2025
anoadragon453 added a commit to matrix-org/complement that referenced this pull request May 7, 2025
This was required as of moby v28: moby/moby#49541
kegsay added a commit to matrix-org/complement that referenced this pull request May 8, 2025
…address already in use" reliably on docker v28 (#776)

* Update docker client v26.1.5 -> v28.1.1

* Set a deterministic network interface name, and ensure we're the default gateway

These options were introduced in v28. They are ignored by older Docker
client versions.

* Update go from `1.22` -> `1.23`

This was required as of moby v28: moby/moby#49541

* Update types to new names/locations for docker v28

* Downgrade docker to work with more installations:

* Reapply v28.0.4 since we need priority?

* Remove needless config; this will break homerunner

* Include alias again for fed tests

---------

Co-authored-by: Kegan Dougal <7190048+kegsay@users.noreply.github.com>
jevolk pushed a commit to matrix-construct/complement that referenced this pull request Jul 22, 2025
…address already in use" reliably on docker v28 (matrix-org#776)

* Update docker client v26.1.5 -> v28.1.1

* Set a deterministic network interface name, and ensure we're the default gateway

These options were introduced in v28. They are ignored by older Docker
client versions.

* Update go from `1.22` -> `1.23`

This was required as of moby v28: moby/moby#49541

* Update types to new names/locations for docker v28

* Downgrade docker to work with more installations:

* Reapply v28.0.4 since we need priority?

* Remove needless config; this will break homerunner

* Include alias again for fed tests

---------

Co-authored-by: Kegan Dougal <7190048+kegsay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants