-
Notifications
You must be signed in to change notification settings - Fork 18.9k
fix pre-1.21 docker stats #17549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix pre-1.21 docker stats #17549
Conversation
This fixes a bug introduced in moby#15786: * if a pre-v1.20 client requested docker stats, the daemon would return both an API-compatible JSON blob *and* an API-incompatible JSON blob: see https://gist.github.com/donhcd/338a5b3681cd6a071629 Signed-off-by: Donald Huang <don.hcd@gmail.com>
147e2d1 to
d2c04f8
Compare
|
can we have tests to make sure we're returning the right structs in https://github.com/docker/docker/blob/master/integration-cli/docker_api_stats_test.go ? |
|
Changes look good to me, but we need to make sure this is the right behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@calavera are we sure about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code already exists below on line 114 (in the new version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense thanks
|
LGTM |
1 similar comment
|
LGTM |
testing for moby#17549 Signed-off-by: Donald Huang <don.hcd@gmail.com>
This fixes a bug introduced in #15786:
would return both an API-compatible JSON blob and an API-incompatible JSON
blob: see https://gist.github.com/donhcd/338a5b3681cd6a071629
Signed-off-by: Donald Huang don.hcd@gmail.com