Skip to content

Use the official moby/api types for Docker progress#750

Open
mtrmac wants to merge 1 commit intocontainers:mainfrom
mtrmac:client-better
Open

Use the official moby/api types for Docker progress#750
mtrmac wants to merge 1 commit intocontainers:mainfrom
mtrmac:client-better

Conversation

@mtrmac
Copy link
Copy Markdown
Contributor

@mtrmac mtrmac commented Apr 8, 2026

A low-priority cleanup.

Nowadays the API type definitions are separate from code, and we indirectly import this subpackage anyway (it's used by moby/client, we can't avoid it), so use the official types instead of private copies.

Should not change behavior against ordinary clients; hypothetically might cause decoding errors if one of the now-decoded fields used an invalid type or value.

Nowadays the API type definitions are separate from code,
and we indirectly import this subpackage anyway (it's
used by moby/client, we can't avoid it), so use the official
types instead of private copies.

Should not change behavior against ordinary clients; hypothetically
might cause decoding errors if one of the now-decoded fields
used an invalid type or value.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@github-actions github-actions bot added the image Related to "image" package label Apr 8, 2026
@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Apr 8, 2026

Do we want this? At least on the podman side I somewhat regret having to deal with the consistent breaking changes of the types, new names, deprecations, etc...

I guess this is simple enough to not matter here so no strong opinion. I am fine with merging.

@mtrmac
Copy link
Copy Markdown
Contributor Author

mtrmac commented Apr 8, 2026

I don’t feel strongly about this at all.

This code is exposed to the moby/moby/client changes anyway, but there’s no compelling reason to use the external types. (ImagePull returns a value where moby/client actually does the decoding of the stream; deferring that to the external package would be more interesting. Here we still need to hard-code the stream syntax.)

Alternatively, we could just update the comments here to stop referring to removed subpackages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants