Skip to content

client: remove NegotiateAPIVersion, NegotiateAPIVersionPing#51307

Merged
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:ping_once
Oct 28, 2025
Merged

client: remove NegotiateAPIVersion, NegotiateAPIVersionPing#51307
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:ping_once

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 27, 2025

Remove these methods in favor of adding negotiation options to the Ping method.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

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

Remove these methods in favor of adding negotiation options to the
Ping method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 29.0.0 milestone Oct 27, 2025
@thaJeztah thaJeztah added the release-blocker PRs we want to block a release on label Oct 27, 2025
Comment on lines 261 to -265
func (cli *Client) checkVersion(ctx context.Context) error {
if !cli.manualOverride && cli.negotiateVersion && !cli.negotiated.Load() {
// Ensure exclusive write access to version and negotiated fields
cli.negotiateLock.Lock()
defer cli.negotiateLock.Unlock()
Copy link
Member Author

Choose a reason for hiding this comment

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

I have some follow-up changes to make to solidify some of the logic, but those should not introduce user-facing changes, so I'll work on those later.

Comment on lines 252 to 254
func TestNegotiateAPIVersionEmpty(t *testing.T) {
t.Setenv("DOCKER_API_VERSION", "")

Copy link
Member Author

Choose a reason for hiding this comment

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

Various of these tests have some overlap as well (and some should likely be moved to client/ping_test.go, but also keeping that for a later exercise. 😅

@thaJeztah thaJeztah marked this pull request as ready for review October 27, 2025 20:49
@austinvazquez austinvazquez merged commit e95f6c8 into moby:master Oct 28, 2025
187 checks passed
@thaJeztah thaJeztah deleted the ping_once branch October 28, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants