From 862ebf45554910ed86008f5b7293ca9f5c858510 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 8 Jan 2026 18:34:20 +0100 Subject: [PATCH] vendor: moby/api v1.53.0-rc.2, moby/client v0.2.2-rc.2 Signed-off-by: Sebastiaan van Stijn --- vendor.mod | 4 ++-- vendor.sum | 8 ++++---- .../moby/moby/api/types/jsonstream/message.go | 4 ++-- vendor/github.com/moby/moby/api/types/swarm/task.go | 2 +- .../github.com/moby/moby/client/client_options.go | 13 ++++++++++--- .../github.com/moby/moby/client/container_exec.go | 4 ++-- .../github.com/moby/moby/client/container_rename.go | 4 ++-- .../moby/moby/client/internal/jsonmessages.go | 7 +++++-- .../moby/moby/client/system_disk_usage.go | 2 ++ vendor/github.com/moby/moby/client/utils.go | 9 +++++++-- vendor/github.com/moby/moby/client/volume_prune.go | 4 ++-- vendor/modules.txt | 4 ++-- 12 files changed, 41 insertions(+), 24 deletions(-) diff --git a/vendor.mod b/vendor.mod index ab3608b5de2d..2a7b2d8ce661 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.19 github.com/moby/go-archive v0.2.0 - github.com/moby/moby/api v1.53.0-rc.1 - github.com/moby/moby/client v0.2.2-rc.1 + github.com/moby/moby/api v1.53.0-rc.1.0.20260112134000-28c9d26ba605 // master / v1.53.0-rc.2 + github.com/moby/moby/client v0.2.2-rc.1.0.20260112134000-28c9d26ba605 // master / v0.2.2-rc.2 github.com/moby/patternmatcher v0.6.0 github.com/moby/swarmkit/v2 v2.1.1 github.com/moby/sys/atomicwriter v0.1.0 diff --git a/vendor.sum b/vendor.sum index 6e2544d7ea4e..e8ffb906a416 100644 --- a/vendor.sum +++ b/vendor.sum @@ -113,10 +113,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.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8= github.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU= -github.com/moby/moby/api v1.53.0-rc.1 h1:M5SUwRbTrNy+plCTiV6gn4ZiN/Csynk0imIsUmOgHGI= -github.com/moby/moby/api v1.53.0-rc.1/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/client v0.2.2-rc.1 h1:Ah2bPvdR3ZzHK+AvZeyLMyHHfEHifYlAyuWY33dLIno= -github.com/moby/moby/client v0.2.2-rc.1/go.mod h1:tbJAygdiC6iCbKkVez27Jjm9y8vdvs8y9mizjiQrNRI= +github.com/moby/moby/api v1.53.0-rc.1.0.20260112134000-28c9d26ba605 h1:g1w5NogyyZcrg51cvDcApZ9jaCwlTR08NtrXAYAwYTs= +github.com/moby/moby/api v1.53.0-rc.1.0.20260112134000-28c9d26ba605/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= +github.com/moby/moby/client v0.2.2-rc.1.0.20260112134000-28c9d26ba605 h1:DwTxxKeRaPUHwyR7qhQRfs3BP8/B6TnB+wWjX9dEwJM= +github.com/moby/moby/client v0.2.2-rc.1.0.20260112134000-28c9d26ba605/go.mod h1:7/LxA6hSevmFTvA8atcSN/W9x8bBC6vKjEwY5AKUs00= 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.1 h1:yvTJ8MMCc3f0qTA44J6R59EZ5yZawdYopkpuLk4+ICU= diff --git a/vendor/github.com/moby/moby/api/types/jsonstream/message.go b/vendor/github.com/moby/moby/api/types/jsonstream/message.go index 2e1346d41903..6b74bd932706 100644 --- a/vendor/github.com/moby/moby/api/types/jsonstream/message.go +++ b/vendor/github.com/moby/moby/api/types/jsonstream/message.go @@ -2,9 +2,9 @@ package jsonstream import "encoding/json" -// JSONMessage defines a message struct. It describes +// Message defines a message struct. It describes // the created time, where it from, status, ID of the -// message. It's used for docker events. +// message. type Message struct { Stream string `json:"stream,omitempty"` Status string `json:"status,omitempty"` diff --git a/vendor/github.com/moby/moby/api/types/swarm/task.go b/vendor/github.com/moby/moby/api/types/swarm/task.go index f61190683c45..83f87028bcbb 100644 --- a/vendor/github.com/moby/moby/api/types/swarm/task.go +++ b/vendor/github.com/moby/moby/api/types/swarm/task.go @@ -148,7 +148,7 @@ type ResourceRequirements struct { // Tune container memory swappiness (0 to 100) - if not specified, defaults // to the container OS's default - generally 60, or the value predefined in // the image; set to -1 to unset a previously set value - MemorySwappiness *int64 `json:MemorySwappiness,omitzero"` + MemorySwappiness *int64 `json:"MemorySwappiness,omitzero"` } // Placement represents orchestration parameters. diff --git a/vendor/github.com/moby/moby/client/client_options.go b/vendor/github.com/moby/moby/client/client_options.go index 295d2991807b..ae80c4e5cf01 100644 --- a/vendor/github.com/moby/moby/client/client_options.go +++ b/vendor/github.com/moby/moby/client/client_options.go @@ -133,8 +133,6 @@ func (tf testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) return tf(req) } -func (testRoundTripper) skipConfigureTransport() bool { return true } - // WithHostFromEnv overrides the client host with the host specified in the // DOCKER_HOST ([EnvOverrideHost]) environment variable. If DOCKER_HOST is not set, // or set to an empty value, the host is not modified. @@ -151,7 +149,16 @@ func WithHostFromEnv() Opt { func WithHTTPClient(client *http.Client) Opt { return func(c *clientConfig) error { if client != nil { - c.client = client + // Make a clone of client so modifications do not affect + // the caller's client. Clone here instead of in New() + // as other options (WithHost) also mutate c.client. + // Cloned clients share the same CookieJar as the + // original. + hc := *client + if ht, ok := hc.Transport.(*http.Transport); ok { + hc.Transport = ht.Clone() + } + c.client = &hc } return nil } diff --git a/vendor/github.com/moby/moby/client/container_exec.go b/vendor/github.com/moby/moby/client/container_exec.go index 1af6a4e20f98..953836423af3 100644 --- a/vendor/github.com/moby/moby/client/container_exec.go +++ b/vendor/github.com/moby/moby/client/container_exec.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "github.com/containerd/errdefs" + cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/container" ) @@ -152,7 +152,7 @@ func (cli *Client) ExecAttach(ctx context.Context, execID string, options ExecAt func getConsoleSize(hasTTY bool, consoleSize ConsoleSize) (*[2]uint, error) { if consoleSize.Height != 0 || consoleSize.Width != 0 { if !hasTTY { - return nil, errdefs.ErrInvalidArgument.WithMessage("console size is only supported when TTY is enabled") + return nil, cerrdefs.ErrInvalidArgument.WithMessage("console size is only supported when TTY is enabled") } return &[2]uint{consoleSize.Height, consoleSize.Width}, nil } diff --git a/vendor/github.com/moby/moby/client/container_rename.go b/vendor/github.com/moby/moby/client/container_rename.go index 7c6d515b393d..4fd28a498647 100644 --- a/vendor/github.com/moby/moby/client/container_rename.go +++ b/vendor/github.com/moby/moby/client/container_rename.go @@ -5,7 +5,7 @@ import ( "net/url" "strings" - "github.com/containerd/errdefs" + cerrdefs "github.com/containerd/errdefs" ) // ContainerRenameOptions represents the options for renaming a container. @@ -28,7 +28,7 @@ func (cli *Client) ContainerRename(ctx context.Context, containerID string, opti if options.NewName == "" || strings.TrimPrefix(options.NewName, "/") == "" { // daemons before v29.0 did not handle the canonical name ("/") well // let's be nice and validate it here before sending - return ContainerRenameResult{}, errdefs.ErrInvalidArgument.WithMessage("new name cannot be blank") + return ContainerRenameResult{}, cerrdefs.ErrInvalidArgument.WithMessage("new name cannot be blank") } query := url.Values{} diff --git a/vendor/github.com/moby/moby/client/internal/jsonmessages.go b/vendor/github.com/moby/moby/client/internal/jsonmessages.go index ebbb5faa39c1..03afc4e80a63 100644 --- a/vendor/github.com/moby/moby/client/internal/jsonmessages.go +++ b/vendor/github.com/moby/moby/client/internal/jsonmessages.go @@ -45,12 +45,15 @@ func (r stream) Close() error { // JSONMessages decodes the response stream as a sequence of JSONMessages. // if stream ends or context is cancelled, the underlying [io.Reader] is closed. func (r stream) JSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error] { - context.AfterFunc(ctx, func() { + stop := context.AfterFunc(ctx, func() { _ = r.Close() }) dec := json.NewDecoder(r) return func(yield func(jsonstream.Message, error) bool) { - defer r.Close() + defer func() { + stop() // unregister AfterFunc + r.Close() + }() for { var jm jsonstream.Message err := dec.Decode(&jm) diff --git a/vendor/github.com/moby/moby/client/system_disk_usage.go b/vendor/github.com/moby/moby/client/system_disk_usage.go index 64a369df8f92..1bb2d0d7efa2 100644 --- a/vendor/github.com/moby/moby/client/system_disk_usage.go +++ b/vendor/github.com/moby/moby/client/system_disk_usage.go @@ -276,6 +276,8 @@ func containerDiskUsageFromLegacyAPI(du *legacyDiskUsage) ContainersDiskUsage { case container.StateRunning, container.StatePaused, container.StateRestarting: cdu.ActiveCount++ used += c.SizeRw + case container.StateCreated, container.StateRemoving, container.StateExited, container.StateDead: + // not active } } diff --git a/vendor/github.com/moby/moby/client/utils.go b/vendor/github.com/moby/moby/client/utils.go index f2ba4744c4f7..4415e0dc5a62 100644 --- a/vendor/github.com/moby/moby/client/utils.go +++ b/vendor/github.com/moby/moby/client/utils.go @@ -136,14 +136,19 @@ func newCancelReadCloser(ctx context.Context, rc io.ReadCloser) io.ReadCloser { rc: rc, close: sync.OnceValue(rc.Close), } - context.AfterFunc(ctx, func() { _ = crc.Close() }) + crc.stop = context.AfterFunc(ctx, func() { _ = crc.Close() }) return crc } type cancelReadCloser struct { rc io.ReadCloser close func() error + stop func() bool } func (c *cancelReadCloser) Read(p []byte) (int, error) { return c.rc.Read(p) } -func (c *cancelReadCloser) Close() error { return c.close() } + +func (c *cancelReadCloser) Close() error { + c.stop() // unregister AfterFunc + return c.close() +} diff --git a/vendor/github.com/moby/moby/client/volume_prune.go b/vendor/github.com/moby/moby/client/volume_prune.go index 561e328d7367..eec0f482baf1 100644 --- a/vendor/github.com/moby/moby/client/volume_prune.go +++ b/vendor/github.com/moby/moby/client/volume_prune.go @@ -6,7 +6,7 @@ import ( "fmt" "net/url" - "github.com/containerd/errdefs" + cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/volume" ) @@ -29,7 +29,7 @@ type VolumePruneResult struct { func (cli *Client) VolumePrune(ctx context.Context, options VolumePruneOptions) (VolumePruneResult, error) { if options.All { if _, ok := options.Filters["all"]; ok { - return VolumePruneResult{}, errdefs.ErrInvalidArgument.WithMessage(`conflicting options: cannot specify both "all" and "all" filter`) + return VolumePruneResult{}, cerrdefs.ErrInvalidArgument.WithMessage(`conflicting options: cannot specify both "all" and "all" filter`) } if options.Filters == nil { options.Filters = Filters{} diff --git a/vendor/modules.txt b/vendor/modules.txt index f45750c4d945..fc44a29ab9b6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -167,7 +167,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.53.0-rc.1 +# github.com/moby/moby/api v1.53.0-rc.1.0.20260112134000-28c9d26ba605 ## explicit; go 1.24.0 github.com/moby/moby/api/pkg/authconfig github.com/moby/moby/api/pkg/stdcopy @@ -189,7 +189,7 @@ github.com/moby/moby/api/types/storage github.com/moby/moby/api/types/swarm github.com/moby/moby/api/types/system github.com/moby/moby/api/types/volume -# github.com/moby/moby/client v0.2.2-rc.1 +# github.com/moby/moby/client v0.2.2-rc.1.0.20260112134000-28c9d26ba605 ## explicit; go 1.24.0 github.com/moby/moby/client github.com/moby/moby/client/internal