From 24e95b86828c0d070c43ef98fe0bbed6585b185e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 14 Oct 2025 10:31:57 +0200 Subject: [PATCH] vendor: github.com/moby/moby/api v1.52.0-beta.2, moby/client v0.1.0-beta.2 full diff: - https://github.com/moby/moby/compare/0769fe708773...api/v1.52.0-beta.2 - https://github.com/moby/moby/compare/0769fe708773...client/v0.1.0-beta.2 Signed-off-by: Sebastiaan van Stijn --- cli/command/container/stats.go | 21 +------------------ cli/command/utils.go | 17 +-------------- vendor.mod | 4 ++-- vendor.sum | 8 +++---- .../moby/moby/api/types/container/config.go | 2 +- .../moby/api/types/image/image_history.go | 4 +++- .../moby/moby/api/types/volume/volume.go | 2 +- vendor/github.com/moby/moby/client/filters.go | 13 ++++++++++++ vendor/modules.txt | 4 ++-- 9 files changed, 28 insertions(+), 47 deletions(-) diff --git a/cli/command/container/stats.go b/cli/command/container/stats.go index eceab0c005..673b78f889 100644 --- a/cli/command/container/stats.go +++ b/cli/command/container/stats.go @@ -101,24 +101,6 @@ var acceptedStatsFilters = map[string]bool{ "label": true, } -// cloneFilters returns a deep copy of f. -// -// TODO(thaJeztah): add this as a "Clone" method on client.Filters. -func cloneFilters(f client.Filters) client.Filters { - if f == nil { - return nil - } - out := make(client.Filters, len(f)) - for term, values := range f { - inner := make(map[string]bool, len(values)) - for v, ok := range values { - inner[v] = ok - } - out[term] = inner - } - return out -} - // RunStats displays a live stream of resource usage statistics for one or more containers. // This shows real-time information on CPU usage, memory usage, and network I/O. // @@ -183,8 +165,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions) // the original set of filters. Custom filters are used both // to list containers and to filter events, but the "type" filter // is not valid for filtering containers. - f := cloneFilters(options.Filters) - f.Add("type", string(events.ContainerEventType)) + f := options.Filters.Clone().Add("type", string(events.ContainerEventType)) eventChan, errChan := apiClient.Events(ctx, client.EventsListOptions{ Filters: f, }) diff --git a/cli/command/utils.go b/cli/command/utils.go index defef14204..e9ca7fc8c5 100644 --- a/cli/command/utils.go +++ b/cli/command/utils.go @@ -23,7 +23,7 @@ import ( // (i.e., "label=some-value" conflicts with "label!=some-value", and vice versa), // then the filter defined in config.json is omitted. func PruneFilters(dockerCLI config.Provider, filters client.Filters) client.Filters { - pruneFilters := cloneFilters(filters) + pruneFilters := filters.Clone() cfg := dockerCLI.ConfigFile() if cfg == nil { @@ -58,21 +58,6 @@ func PruneFilters(dockerCLI config.Provider, filters client.Filters) client.Filt return pruneFilters } -// cloneFilters returns a deep copy of f, creating a new filter if f is nil. -// -// TODO(thaJeztah): add this as a "Clone" method on client.Filters. -func cloneFilters(f client.Filters) client.Filters { - out := make(client.Filters, len(f)) - for term, values := range f { - inner := make(map[string]bool, len(values)) - for v, ok := range values { - inner[v] = ok - } - out[term] = inner - } - return out -} - // ValidateOutputPath validates the output paths of the "docker cp" command. func ValidateOutputPath(path string) error { dir := filepath.Dir(filepath.Clean(path)) diff --git a/vendor.mod b/vendor.mod index e1a39fac6c..c9930d7fbb 100644 --- a/vendor.mod +++ b/vendor.mod @@ -28,8 +28,8 @@ require ( github.com/google/uuid v1.6.0 github.com/mattn/go-runewidth v0.0.17 github.com/moby/go-archive v0.1.0 - github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773 // master - github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773 // master + github.com/moby/moby/api v1.52.0-beta.2 + github.com/moby/moby/client v0.1.0-beta.2 github.com/moby/patternmatcher v0.6.0 github.com/moby/swarmkit/v2 v2.1.0 github.com/moby/sys/atomicwriter v0.1.0 diff --git a/vendor.sum b/vendor.sum index 94f86a2936..2eae27ca32 100644 --- a/vendor.sum +++ b/vendor.sum @@ -170,10 +170,10 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ= github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo= -github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773 h1:SY73tuW7whJlBtFXGdeIlJhdGD6Hcwz7Wjl7E0Flolc= -github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s= -github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773 h1:8hci/QpqJiLKap87P/1YF1pLtYF8XpWdPyQQmPPcYDc= -github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI= +github.com/moby/moby/api v1.52.0-beta.2 h1:cuilbu4cLBZnlNpJXuv3QTleOxgo3kGqkNGt3ICe1yY= +github.com/moby/moby/api v1.52.0-beta.2/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s= +github.com/moby/moby/client v0.1.0-beta.2 h1:Uy7JhcAOvQAQriowODpHaAJokfw/AhUya0216sk1hAk= +github.com/moby/moby/client v0.1.0-beta.2/go.mod h1:yYEv2G6pYi8u63ga0zlU9KsM7DpoGXubtMaZMJE7/dw= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/swarmkit/v2 v2.1.0 h1:u+cJ5hSyF3HnzsyI+NtegYxdIPQIuibk7IbpXNxuISM= diff --git a/vendor/github.com/moby/moby/api/types/container/config.go b/vendor/github.com/moby/moby/api/types/container/config.go index c5650f10c9..98e7c479c6 100644 --- a/vendor/github.com/moby/moby/api/types/container/config.go +++ b/vendor/github.com/moby/moby/api/types/container/config.go @@ -46,7 +46,7 @@ type Config struct { // // Deprecated: this field is deprecated since API v1.44. Use EndpointSettings.MacAddress instead. MacAddress string `json:",omitempty"` - OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile + OnBuild []string `json:",omitempty"` // ONBUILD metadata that were defined on the image Dockerfile Labels map[string]string // List of labels set to this container StopSignal string `json:",omitempty"` // Signal to stop a container StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container diff --git a/vendor/github.com/moby/moby/api/types/image/image_history.go b/vendor/github.com/moby/moby/api/types/image/image_history.go index 40aa962585..648ba779e5 100644 --- a/vendor/github.com/moby/moby/api/types/image/image_history.go +++ b/vendor/github.com/moby/moby/api/types/image/image_history.go @@ -1,7 +1,9 @@ +// Code generated by go-swagger; DO NOT EDIT. + package image // ---------------------------------------------------------------------------- -// Code generated by `swagger generate operation`. DO NOT EDIT. +// Code generated by `swagger generate operation`. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/moby/moby/api/types/volume/volume.go b/vendor/github.com/moby/moby/api/types/volume/volume.go index 7c199ed1e7..524ebfb8ac 100644 --- a/vendor/github.com/moby/moby/api/types/volume/volume.go +++ b/vendor/github.com/moby/moby/api/types/volume/volume.go @@ -59,7 +59,7 @@ type Volume struct { // does not support this feature. // // Example: {"hello":"world"} - Status map[string]interface{} `json:"Status,omitempty"` + Status map[string]any `json:"Status,omitempty"` // usage data UsageData *UsageData `json:"UsageData,omitempty"` diff --git a/vendor/github.com/moby/moby/client/filters.go b/vendor/github.com/moby/moby/client/filters.go index ac9202e2c5..347ad5c689 100644 --- a/vendor/github.com/moby/moby/client/filters.go +++ b/vendor/github.com/moby/moby/client/filters.go @@ -30,6 +30,19 @@ func (f Filters) Add(term string, values ...string) Filters { return f } +// Clone returns a deep copy of f. +func (f Filters) Clone() Filters { + out := make(Filters, len(f)) + for term, values := range f { + inner := make(map[string]bool, len(values)) + for v, ok := range values { + inner[v] = ok + } + out[term] = inner + } + return out +} + // updateURLValues sets the "filters" key in values to the marshalled value of // f, replacing any existing values. When f is empty, any existing "filters" key // is removed. diff --git a/vendor/modules.txt b/vendor/modules.txt index f80262829d..5cd2f85086 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -168,7 +168,7 @@ github.com/moby/docker-image-spec/specs-go/v1 github.com/moby/go-archive github.com/moby/go-archive/compression github.com/moby/go-archive/tarheader -# github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773 +# github.com/moby/moby/api v1.52.0-beta.2 ## explicit; go 1.23.0 github.com/moby/moby/api/pkg/authconfig github.com/moby/moby/api/pkg/progress @@ -193,7 +193,7 @@ github.com/moby/moby/api/types/swarm github.com/moby/moby/api/types/system github.com/moby/moby/api/types/versions github.com/moby/moby/api/types/volume -# github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773 +# github.com/moby/moby/client v0.1.0-beta.2 ## explicit; go 1.23.0 github.com/moby/moby/client github.com/moby/moby/client/internal