Skip to content

client: define default (and maximum) API version#50433

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:client_separate_version
Jul 21, 2025
Merged

client: define default (and maximum) API version#50433
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:client_separate_version

Conversation

@thaJeztah
Copy link
Member

With the client and API migrating to separate modules, users of the Client module may upgrade the API module to higher versions. Currently, the Client uses the API's Default version. While the version of the API module is allowed to be updated (following SemVer), we should not allow the Client to support higher API versions than it was written for.

This patch introduces a DefaultAPIVersion in the client package that is used as default version of the API for the client to use.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: client: add `DefaultAPIVersion` const, which defines the default (and maximum) API version supported by the client.

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

With the client and API migrating to separate modules, users of the Client
module may upgrade the API module to higher versions. Currently, the Client
uses the API's Default version. While the version of the API module is
allowed to be updated (following SemVer), we should not allow the Client
to support higher API versions than it was written for.

This patch introduces a DefaultAPIVersion in the client package that is
used as default version of the API for the client to use.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 29.0.0 milestone Jul 17, 2025
@thaJeztah thaJeztah added status/2-code-review impact/changelog area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK release-blocker PRs we want to block a release on go-modules labels Jul 17, 2025
@thaJeztah
Copy link
Member Author

Flaky test on Windows?

=== Failed
=== FAIL: github.com/docker/docker/integration-cli TestDockerAPISuite/TestContainersAPICreateMountsCreate/2_config:_{volume_test1_c:\foo_false__<nil>_<nil>_<nil>_<nil>_<nil>} (12.04s)
    docker_api_containers_test.go:1952: timeout hit after 10s: container 6426c55d0bc4a4f1777d92f3a7174cce727b18d4a7768bedf6972f7dbe4fbda8 is running, waiting for exit

@thaJeztah thaJeztah requested a review from vvoland July 20, 2025 16:24
@thaJeztah thaJeztah merged commit 2b05296 into moby:master Jul 21, 2025
232 of 234 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in go modules transition Jul 21, 2025
@thaJeztah thaJeztah deleted the client_separate_version branch July 21, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk go-modules impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK release-blocker PRs we want to block a release on status/2-code-review

Projects

Development

Successfully merging this pull request may close these issues.

3 participants