Skip to content

Conversation

@thaJeztah
Copy link
Member

This field is set for the request as a whole, so can be obtained from the server-info instead. Docker v29 will provide per-stats information.

- 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)

This field is set for the request as a whole, so can be obtained
from the server-info instead. Docker v29 will provide per-stats
information.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/container/stats.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thaJeztah thaJeztah requested a review from Copilot October 27, 2025 20:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the docker stats command to obtain the daemon OS type from server info at the start of execution, rather than extracting it from individual stats responses. This change prepares the codebase for Docker v29, which will provide per-stats OS type information.

  • Moved daemonOSType initialization to the beginning of RunStats() using dockerCLI.ServerInfo().OSType
  • Removed the assignment of daemonOSType from individual stats responses in the collect() function
  • Eliminated the fallback OS type check that was previously done after stats collection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cli/command/container/stats.go Initializes daemonOSType at function start and removes the fallback check after stats collection
cli/command/container/stats_helpers.go Removes the per-response assignment of daemonOSType in the stats collection loop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@austinvazquez austinvazquez merged commit e50c94f into docker:master Oct 28, 2025
87 checks passed
@thaJeztah thaJeztah deleted the stats_ostype branch October 28, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants