api/types/container.StatsResponseReader: move to client#50521
Merged
thaJeztah merged 3 commits intomoby:masterfrom Jul 28, 2025
Merged
api/types/container.StatsResponseReader: move to client#50521thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah merged 3 commits intomoby:masterfrom
Conversation
This type was only used in the client, and needs a rewrite; let's move it to the client first. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
11a9711 to
97827e1
Compare
vvoland
approved these changes
Jul 28, 2025
Comment on lines
+88
to
+89
| ContainerStats(ctx context.Context, container string, stream bool) (StatsResponseReader, error) | ||
| ContainerStatsOneShot(ctx context.Context, container string) (StatsResponseReader, error) |
Contributor
There was a problem hiding this comment.
note: This is a breaking change to the interface, so will need some adjusting in places like: https://github.com/docker/compose/blob/52f04229c0391a16b29191227fd0d6284a9b4592/pkg/api/dryrunclient.go#L398-L405
Member
Author
There was a problem hiding this comment.
So, yes and no! But it makes your head spin thinking about some of these 🤯 🤯 ;
- ✅ This is an entirely NEW module (
github.com/moby/moby/client). It has NO relation with what was previously shipped asgithub.com/docker/docker/client - ✅ So if compose switches to the module, it's not a breaking change, but does require a couple more lines to changes (besides
s|docker/docker/|moby/moby/|) - ☝️ 👉 which may still be good to highlight in release notes (have some "transition" guide somewhere).
⚠️ BUT!! It might conflict if compose switches to the module, but also imports other modules (likebuildx), and code is expected for them to use the same types!- 💡 Which is why I had my (still WIP) PR to have a transitional 28.x release that aliases old -> new; [28.x] api: implement api using new module #50475
⚠️ BUT!!⚠️ this one may be potentially tricky, and I have to verify it, because it would require an alias fromgithub.com/docker/docker/api/xxxxtogithub.com/moby/moby/client/xxxAND we may need aliases that do the reverse (github.com/docker/docker/client->github.com/moby/moby/api/xxx(orgithub.com/moby/moby/client), so it's possible that we end up with a circular import 💥💥💥.- 🤞 🤞 🤞 I hope that's not the case, but can't fully have the full picture in my head, so we'll see when I update the PR I linked
This was referenced Aug 4, 2025
This was referenced Sep 5, 2025
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.
This type was only used in the client, and needs a rewrite; let's move it to the client first.
Also fix some minor linting issues in tests.
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)