mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
API: deprecate BuilderSize
in API versions >= 1.42
Co-authored-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
This commit is contained in:
parent
c81abefdb1
commit
31348afa19
3 changed files with 12 additions and 5 deletions
|
@ -113,12 +113,14 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter,
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
var builderSize int64
|
if versions.LessThan(httputils.VersionFromContext(ctx), "1.42") {
|
||||||
for _, b := range buildCache {
|
var builderSize int64
|
||||||
builderSize += b.Size
|
for _, b := range buildCache {
|
||||||
|
builderSize += b.Size
|
||||||
|
}
|
||||||
|
du.BuilderSize = builderSize
|
||||||
}
|
}
|
||||||
|
|
||||||
du.BuilderSize = builderSize
|
|
||||||
du.BuildCache = buildCache
|
du.BuildCache = buildCache
|
||||||
if buildCache == nil {
|
if buildCache == nil {
|
||||||
// Ensure empty `BuildCache` field is represented as empty JSON array(`[]`)
|
// Ensure empty `BuildCache` field is represented as empty JSON array(`[]`)
|
||||||
|
|
|
@ -538,7 +538,7 @@ type DiskUsage struct {
|
||||||
Containers []*Container
|
Containers []*Container
|
||||||
Volumes []*Volume
|
Volumes []*Volume
|
||||||
BuildCache []*BuildCache
|
BuildCache []*BuildCache
|
||||||
BuilderSize int64 // deprecated
|
BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40.
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainersPruneReport contains the response for Engine API:
|
// ContainersPruneReport contains the response for Engine API:
|
||||||
|
|
|
@ -17,6 +17,11 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||||
|
|
||||||
[Docker Engine API v1.42](https://docs.docker.com/engine/api/v1.42/) documentation
|
[Docker Engine API v1.42](https://docs.docker.com/engine/api/v1.42/) documentation
|
||||||
|
|
||||||
|
* Removed the `BuilderSize` field on the `GET /system/df` endpoint. This field
|
||||||
|
was introduced in API 1.31 as part of an experimental feature, and no longer
|
||||||
|
used since API 1.40.
|
||||||
|
Use field `BuildCache` instead to track storage used by the builder component.
|
||||||
|
|
||||||
## v1.41 API changes
|
## v1.41 API changes
|
||||||
|
|
||||||
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
|
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
|
||||||
|
|
Loading…
Add table
Reference in a new issue