diff options
| author | Sebastiaan van Stijn <github@gone.nl> | 2022-05-23 12:56:39 +0200 |
|---|---|---|
| committer | Sebastiaan van Stijn <github@gone.nl> | 2022-08-04 09:27:34 +0200 |
| commit | ebf339628a7a3a285ae7abd7104a4a0baede422e (patch) | |
| tree | 6faf939040cb16888432011207ebb1fdf720b9e2 /api/server/router | |
| parent | e0286d7f4ef79ad7a5f9b95dcfe21c54aa20d4a2 (diff) | |
| download | docker-ebf339628a7a3a285ae7abd7104a4a0baede422e.tar.gz | |
api: deprecate BuildCache.Parent in API >= v1.42
This field has been deprecated in BuildKit, so this follows the deprecation
in the Engine API.
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/api/server/router/system/system_routes.go b/api/server/router/system/system_routes.go index bb7897d229..01addc6754 100644 --- a/api/server/router/system/system_routes.go +++ b/api/server/router/system/system_routes.go @@ -176,6 +176,13 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, builderSize += b.Size } } + if versions.GreaterThanOrEqualTo(version, "1.42") { + for _, b := range buildCache { + // Parent field is deprecated in API v1.42 and up, as it is deprecated + // in BuildKit. Empty the field to omit it in the API response. + b.Parent = "" //nolint:staticcheck // ignore SA1019 (Parent field is deprecated) + } + } du := types.DiskUsage{ BuildCache: buildCache, |
