client: remove API-version compatibility for API < v1.44#51120
Merged
thaJeztah merged 1 commit intomoby:masterfrom Oct 9, 2025
Merged
client: remove API-version compatibility for API < v1.44#51120thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
53cd29b to
67c2d8e
Compare
Member
Author
|
I have some small amount of other patches after this, but more "TBD", which is to make the client fail hard when setting a lower API version, even when done manually ( |
Member
Author
|
Some tests to look into w.r.t. MacAddress (either test is wrong, or something broke). We also need to
|
052b771 to
229f8c7
Compare
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
229f8c7 to
7652f38
Compare
thaJeztah
commented
Oct 8, 2025
Comment on lines
+32
to
+48
| // FIXME(thaJeztah): remove this once we updated our (integration) tests; | ||
| // some integration tests depend on this to test old API versions; see https://github.com/moby/moby/pull/51120#issuecomment-3376224865 | ||
| if config.MacAddress != "" { //nolint:staticcheck // ignore SA1019: field is deprecated, but still used on API < v1.44. | ||
| // Make sure we negotiated (if the client is configured to do so), | ||
| // as code below contains API-version specific handling of options. | ||
| // | ||
| // Normally, version-negotiation (if enabled) would not happen until | ||
| // the API request is made. | ||
| if err := cli.checkVersion(ctx); err != nil { | ||
| return response, err | ||
| } | ||
| if versions.GreaterThanOrEqualTo(cli.ClientVersion(), "1.44") { | ||
| // Since API 1.44, the container-wide MacAddress is deprecated and triggers a WARNING if it's specified. | ||
| // | ||
| // FIXME(thaJeztah): remove the field from the API | ||
| config.MacAddress = "" //nolint:staticcheck // ignore SA1019: field is deprecated, but still used on API < v1.44. | ||
| } |
Member
Author
There was a problem hiding this comment.
Kept this one in place for now, as some integration tests currently depend on this; we can remove this later.
Member
Author
|
OK; let's bring this one in 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)