api/types: move disk usage structs to daemon backend#50764
Merged
thaJeztah merged 4 commits intomoby:masterfrom Aug 20, 2025
Merged
api/types: move disk usage structs to daemon backend#50764thaJeztah merged 4 commits intomoby:masterfrom
thaJeztah merged 4 commits intomoby:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the disk usage data structures by moving them from the public API types packages to the daemon backend where they are actually used. This is part of a larger effort to better organize the codebase and reduce dependencies in the public API.
- Moves disk usage structs from
api/types/*packages todaemon/server/backend - Updates all references to use the new backend types instead of the public API types
- Removes the now-unused disk usage files from the public API packages
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| daemon/server/backend/disk_usage.go | Defines new disk usage structs moved from public API packages |
| daemon/server/router/system/system_routes.go | Updates reference to use new backend BuildCacheDiskUsage type |
| daemon/disk_usage.go | Updates function signatures and struct instantiations to use backend types |
| daemon/daemon.go | Updates singleflight group type parameters to use backend types |
| api/types/*/disk_usage.go | Removes disk usage struct definitions from public API packages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
thaJeztah
reviewed
Aug 19, 2025
api/types/build/disk_usage.go
Outdated
Comment on lines
4
to
5
| // | ||
| // Deprecated: this struct has been deprecated and will be removed in the next release. |
Member
There was a problem hiding this comment.
Similar to the other PR; probably better to make this a separate PR for the 28.x branch that only adds the deprecation message, then in this PR make it a commit that moves it (no deprecation step between).
271160b to
251b4a0
Compare
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
251b4a0 to
c4e82ba
Compare
corhere
approved these changes
Aug 19, 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.
- What I did
Partial for #50740
This change moves the disk usage structs in
api/types/build,api/types/container,api/types/imagesandapi/types/volumesto backend server definitions where the code was actually used.- 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)