Skip to content

Stop using the old github.com/docker/docker package paths#6692

Merged
lsm5 merged 2 commits into
podman-container-tools:mainfrom
mtrmac:docker-client
Feb 25, 2026
Merged

Stop using the old github.com/docker/docker package paths#6692
lsm5 merged 2 commits into
podman-container-tools:mainfrom
mtrmac:docker-client

Conversation

@mtrmac

@mtrmac mtrmac commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind other

What this PR does / why we need it:

Update the Docker client to a newer version and the updated module paths / API.

Some indirect references remain in github.com/fsouza/go-dockerclient and github.com/openshift/imagebuilder.

How to verify it

Existing tests

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This is a subset of #6691 , useful there to limit the scope of the audit. And I think it needs to happen either way.

Does this PR introduce a user-facing change?

None

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 18, 2026
@packit-as-a-service

Copy link
Copy Markdown

Ephemeral COPR build failed. @containers/packit-build please check.

@mtrmac

mtrmac commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

Apparently I broke something, looking…

Comment thread tests/conformance/conformance_test.go Outdated

// connect to dockerd using go-dockerclient
client, err := docker.NewVersionedClientFromEnv(dockerapi.DefaultVersion)
client, err := docker.NewVersionedClientFromEnv(dockerdockerclient.MaxAPIVersion)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is newer than the version of dockerd our conformance tests are talking to knows about.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. What was the motivation for 8d6f3fc ?

I don’t understand using fsouza/go-dockerclient with “the latest version supported by docker/docker/client”; the two are not obviously related. (And I can’t see any API to see what is the latest version supported by fsouza/go-dockerclient.)

AFAICT the daemon treats API requests with no version specified as "the server’s current version”, so the previous version of that was already using “whatever is newest” and assuming that fsouza/go-dockerclient can handle it.

So I’m going to try reverting 8d6f3fc .

Alternatively, we could hard-code 1.51 here to exactly preserve today’s behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

… OK I see why that was necessary. Hard-coding 1.51 then, and adding a comment outlining the reasoning.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When not specified, an API version is set in BuildImage() based on which fields we set in the build options structure that we pass to it. For the conformance tests, this often ends up landing on 1.39 or 1.25, depending on which fields we specify.
The version of the daemon in our debian VMs only understands 1.50, so tests were failing when attempting to use 1.51.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, I must be mistaken about the version of dockerd in the VM - I guess that was a limitation only for imagebuilder.

@mtrmac mtrmac force-pushed the docker-client branch 2 times, most recently from 29ba708 to 12bd50e Compare February 23, 2026 19:42
@mtrmac

mtrmac commented Feb 23, 2026

Copy link
Copy Markdown
Contributor Author

(I have also added a commit to rename the package references, to be hopefully less confusing in the far future.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac

mtrmac commented Feb 23, 2026

Copy link
Copy Markdown
Contributor Author

Tests are passing now.

@nalind nalind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@lsm5 lsm5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@containers/buildah-maintainers PTAL

@lsm5 lsm5 merged commit f20fc42 into podman-container-tools:main Feb 25, 2026
40 checks passed
@mtrmac mtrmac deleted the docker-client branch February 25, 2026 17:50
@stale-locking-app stale-locking-app Bot locked as resolved and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked - please file new issue/PR size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants