diff options
| author | Sebastiaan van Stijn <github@gone.nl> | 2022-08-02 09:49:29 +0200 |
|---|---|---|
| committer | Sebastiaan van Stijn <github@gone.nl> | 2022-08-04 09:30:06 +0200 |
| commit | e0db8207f3b84d030a71f41db70fc7fbf0535b9f (patch) | |
| tree | 87efa7ece6528a4ab8ed71e22506ef7a0ec95f4a /api/server/router | |
| parent | ebf339628a7a3a285ae7abd7104a4a0baede422e (diff) | |
| download | docker-e0db8207f3b84d030a71f41db70fc7fbf0535b9f.tar.gz | |
api: add BuildCache.Parents for API >= v1.42
This field was added to replace the deprecated "Parent" field.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'api/server/router')
| -rw-r--r-- | api/server/router/system/system_routes.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/server/router/system/system_routes.go b/api/server/router/system/system_routes.go index 01addc6754..504da5cb69 100644 --- a/api/server/router/system/system_routes.go +++ b/api/server/router/system/system_routes.go @@ -174,6 +174,8 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, if versions.LessThan(version, "1.42") { for _, b := range buildCache { builderSize += b.Size + // Parents field was added in API 1.42 to replace the Parent field. + b.Parents = nil } } if versions.GreaterThanOrEqualTo(version, "1.42") { |
