From cdcf2672642c38854ed62ac8b84f2520be70f285 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 29 Sep 2025 17:37:46 +0200 Subject: [PATCH] vendor: github.com/moby/moby/api, moby/client master full diff: https://github.com/moby/moby/compare/e98849831fc4...9a97f59e6e2d51818f6b8cf8589199fd6714ebc7 Signed-off-by: Sebastiaan van Stijn --- cli/command/checkpoint/client_test.go | 7 +++---- cli/command/checkpoint/list.go | 8 ++++---- cli/command/checkpoint/list_test.go | 14 +++++++------ vendor.mod | 4 ++-- vendor.sum | 8 ++++---- .../moby/api/types/container/container.go | 8 +++++++- .../moby/api/types/registry/authconfig.go | 5 ----- .../api/types/storage/root_f_s_storage.go | 16 +++++++++++++++ .../storage/root_f_s_storage_snapshot.go | 15 ++++++++++++++ .../moby/moby/api/types/storage/storage.go | 16 +++++++++++++++ .../github.com/moby/moby/client/checkpoint.go | 4 +--- .../moby/moby/client/checkpoint_list.go | 15 +++++++++----- vendor/github.com/moby/moby/client/request.go | 20 ++++++++++++++++++- vendor/modules.txt | 4 ++-- 14 files changed, 107 insertions(+), 37 deletions(-) create mode 100644 vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go create mode 100644 vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go create mode 100644 vendor/github.com/moby/moby/api/types/storage/storage.go diff --git a/cli/command/checkpoint/client_test.go b/cli/command/checkpoint/client_test.go index 8131160bad4c..0c76c0a6dcc4 100644 --- a/cli/command/checkpoint/client_test.go +++ b/cli/command/checkpoint/client_test.go @@ -3,7 +3,6 @@ package checkpoint import ( "context" - "github.com/moby/moby/api/types/checkpoint" "github.com/moby/moby/client" ) @@ -11,7 +10,7 @@ type fakeClient struct { client.Client checkpointCreateFunc func(container string, options client.CheckpointCreateOptions) error checkpointDeleteFunc func(container string, options client.CheckpointDeleteOptions) error - checkpointListFunc func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) + checkpointListFunc func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) } func (cli *fakeClient) CheckpointCreate(_ context.Context, container string, options client.CheckpointCreateOptions) error { @@ -28,9 +27,9 @@ func (cli *fakeClient) CheckpointDelete(_ context.Context, container string, opt return nil } -func (cli *fakeClient) CheckpointList(_ context.Context, container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) { +func (cli *fakeClient) CheckpointList(_ context.Context, container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) { if cli.checkpointListFunc != nil { return cli.checkpointListFunc(container, options) } - return []checkpoint.Summary{}, nil + return client.CheckpointListResult{}, nil } diff --git a/cli/command/checkpoint/list.go b/cli/command/checkpoint/list.go index 5437e59289b5..9eb3a4f75a09 100644 --- a/cli/command/checkpoint/list.go +++ b/cli/command/checkpoint/list.go @@ -36,8 +36,8 @@ func newListCommand(dockerCLI command.Cli) *cobra.Command { return cmd } -func runList(ctx context.Context, dockerCli command.Cli, container string, opts listOptions) error { - checkpoints, err := dockerCli.Client().CheckpointList(ctx, container, client.CheckpointListOptions{ +func runList(ctx context.Context, dockerCLI command.Cli, container string, opts listOptions) error { + checkpoints, err := dockerCLI.Client().CheckpointList(ctx, container, client.CheckpointListOptions{ CheckpointDir: opts.checkpointDir, }) if err != nil { @@ -45,8 +45,8 @@ func runList(ctx context.Context, dockerCli command.Cli, container string, opts } cpCtx := formatter.Context{ - Output: dockerCli.Out(), + Output: dockerCLI.Out(), Format: newFormat(formatter.TableFormatKey), } - return formatWrite(cpCtx, checkpoints) + return formatWrite(cpCtx, checkpoints.Checkpoints) } diff --git a/cli/command/checkpoint/list_test.go b/cli/command/checkpoint/list_test.go index 5b77a37fd381..411022b117de 100644 --- a/cli/command/checkpoint/list_test.go +++ b/cli/command/checkpoint/list_test.go @@ -16,7 +16,7 @@ import ( func TestCheckpointListErrors(t *testing.T) { testCases := []struct { args []string - checkpointListFunc func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) + checkpointListFunc func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) expectedError string }{ { @@ -29,8 +29,8 @@ func TestCheckpointListErrors(t *testing.T) { }, { args: []string{"foo"}, - checkpointListFunc: func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) { - return []checkpoint.Summary{}, errors.New("error getting checkpoints for container foo") + checkpointListFunc: func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) { + return client.CheckpointListResult{}, errors.New("error getting checkpoints for container foo") }, expectedError: "error getting checkpoints for container foo", }, @@ -51,11 +51,13 @@ func TestCheckpointListErrors(t *testing.T) { func TestCheckpointListWithOptions(t *testing.T) { var containerID, checkpointDir string cli := test.NewFakeCli(&fakeClient{ - checkpointListFunc: func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) { + checkpointListFunc: func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) { containerID = container checkpointDir = options.CheckpointDir - return []checkpoint.Summary{ - {Name: "checkpoint-foo"}, + return client.CheckpointListResult{ + Checkpoints: []checkpoint.Summary{ + {Name: "checkpoint-foo"}, + }, }, nil }, }) diff --git a/vendor.mod b/vendor.mod index 7567ad2b30ba..5a7bd11090e8 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.20250923190348-e98849831fc4 // master - github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4 // master + github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d // master + github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d // master 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 a5057b472ab6..4e1b99b11ca3 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.20250923190348-e98849831fc4 h1:nwVKjkAlQJp32lsr/TZ4dGUIkj+Ga6ftle+IVov9HYs= -github.com/moby/moby/api v1.52.0-beta.1.0.20250923190348-e98849831fc4/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok= -github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4 h1:fk0TcJJf4rrgD3I35xxPkb9R4S+KCToMNomydm/n2Pg= -github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI= +github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d h1:Aj0cTKlIyJh8hg5veIvuQEBQgFLtGJ5CJ9qqOV3TOpc= +github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok= +github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d h1:sDDi6SlfhB2ld+fsS3+6rWxLwUL4+++on61QPLAgvtY= +github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI= 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/container.go b/vendor/github.com/moby/moby/api/types/container/container.go index 6dc1693ad476..bffb3de87277 100644 --- a/vendor/github.com/moby/moby/api/types/container/container.go +++ b/vendor/github.com/moby/moby/api/types/container/container.go @@ -134,7 +134,13 @@ type InspectResponse struct { AppArmorProfile string ExecIDs []string HostConfig *HostConfig - GraphDriver storage.DriverData + + // GraphDriver contains information about the container's graph driver. + GraphDriver *storage.DriverData `json:"GraphDriver,omitempty"` + + // Storage contains information about the storage used for the container's filesystem. + Storage *storage.Storage `json:"Storage,omitempty"` + SizeRw *int64 `json:",omitempty"` SizeRootFs *int64 `json:",omitempty"` Mounts []MountPoint diff --git a/vendor/github.com/moby/moby/api/types/registry/authconfig.go b/vendor/github.com/moby/moby/api/types/registry/authconfig.go index e4b797da431d..b612feebaae9 100644 --- a/vendor/github.com/moby/moby/api/types/registry/authconfig.go +++ b/vendor/github.com/moby/moby/api/types/registry/authconfig.go @@ -24,11 +24,6 @@ type AuthConfig struct { Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` - // Email is an optional value associated with the username. - // - // Deprecated: This field is deprecated since docker 1.11 (API v1.23) and will be removed in the next release. - Email string `json:"email,omitempty"` - ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken is used to authenticate the user and get diff --git a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go new file mode 100644 index 000000000000..d82f2b6bcbc2 --- /dev/null +++ b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go @@ -0,0 +1,16 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package storage + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RootFSStorage Information about the storage used for the container's root filesystem. +// +// swagger:model RootFSStorage +type RootFSStorage struct { + + // Information about the snapshot used for the container's root filesystem. + // + Snapshot *RootFSStorageSnapshot `json:"Snapshot,omitempty"` +} diff --git a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go new file mode 100644 index 000000000000..dd2b82d245f6 --- /dev/null +++ b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go @@ -0,0 +1,15 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package storage + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RootFSStorageSnapshot Information about a snapshot backend of the container's root filesystem. +// +// swagger:model RootFSStorageSnapshot +type RootFSStorageSnapshot struct { + + // Name of the snapshotter. + Name string `json:"Name,omitempty"` +} diff --git a/vendor/github.com/moby/moby/api/types/storage/storage.go b/vendor/github.com/moby/moby/api/types/storage/storage.go new file mode 100644 index 000000000000..77843db97089 --- /dev/null +++ b/vendor/github.com/moby/moby/api/types/storage/storage.go @@ -0,0 +1,16 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package storage + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// Storage Information about the storage used by the container. +// +// swagger:model Storage +type Storage struct { + + // Information about the storage used for the container's root filesystem. + // + RootFS *RootFSStorage `json:"RootFS,omitempty"` +} diff --git a/vendor/github.com/moby/moby/client/checkpoint.go b/vendor/github.com/moby/moby/client/checkpoint.go index ac3961ef27aa..46e0c7dd4d6c 100644 --- a/vendor/github.com/moby/moby/client/checkpoint.go +++ b/vendor/github.com/moby/moby/client/checkpoint.go @@ -2,8 +2,6 @@ package client import ( "context" - - "github.com/moby/moby/api/types/checkpoint" ) // CheckpointAPIClient defines API client methods for the checkpoints. @@ -14,5 +12,5 @@ import ( type CheckpointAPIClient interface { CheckpointCreate(ctx context.Context, container string, options CheckpointCreateOptions) error CheckpointDelete(ctx context.Context, container string, options CheckpointDeleteOptions) error - CheckpointList(ctx context.Context, container string, options CheckpointListOptions) ([]checkpoint.Summary, error) + CheckpointList(ctx context.Context, container string, options CheckpointListOptions) (CheckpointListResult, error) } diff --git a/vendor/github.com/moby/moby/client/checkpoint_list.go b/vendor/github.com/moby/moby/client/checkpoint_list.go index b1023d55d946..65a864aab28a 100644 --- a/vendor/github.com/moby/moby/client/checkpoint_list.go +++ b/vendor/github.com/moby/moby/client/checkpoint_list.go @@ -13,9 +13,14 @@ type CheckpointListOptions struct { CheckpointDir string } +// CheckpointListResult holds the result from the CheckpointList method. +type CheckpointListResult struct { + Checkpoints []checkpoint.Summary +} + // CheckpointList returns the checkpoints of the given container in the docker host. -func (cli *Client) CheckpointList(ctx context.Context, container string, options CheckpointListOptions) ([]checkpoint.Summary, error) { - var checkpoints []checkpoint.Summary +func (cli *Client) CheckpointList(ctx context.Context, container string, options CheckpointListOptions) (CheckpointListResult, error) { + var out CheckpointListResult query := url.Values{} if options.CheckpointDir != "" { @@ -25,9 +30,9 @@ func (cli *Client) CheckpointList(ctx context.Context, container string, options resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", query, nil) defer ensureReaderClosed(resp) if err != nil { - return checkpoints, err + return out, err } - err = json.NewDecoder(resp.Body).Decode(&checkpoints) - return checkpoints, err + err = json.NewDecoder(resp.Body).Decode(&out.Checkpoints) + return out, err } diff --git a/vendor/github.com/moby/moby/client/request.go b/vendor/github.com/moby/moby/client/request.go index cd6643b1c407..7c9102edf78f 100644 --- a/vendor/github.com/moby/moby/client/request.go +++ b/vendor/github.com/moby/moby/client/request.go @@ -149,7 +149,25 @@ func (cli *Client) doRequest(req *http.Request) (*http.Response, error) { return nil, errConnectionFailed{fmt.Errorf("%w.\n* Are you trying to connect to a TLS-enabled daemon without TLS?", err)} } - if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") { + const ( + // Go 1.25 / TLS 1.3 may produce a generic "handshake failure" + // whereas TLS 1.2 may produce a "bad certificate" TLS alert. + // See https://github.com/golang/go/issues/56371 + // + // > https://tip.golang.org/doc/go1.12#tls_1_3 + // > + // > In TLS 1.3 the client is the last one to speak in the handshake, so if + // > it causes an error to occur on the server, it will be returned on the + // > client by the first Read, not by Handshake. For example, that will be + // > the case if the server rejects the client certificate. + // + // https://github.com/golang/go/blob/go1.25.1/src/crypto/tls/alert.go#L71-L72 + alertBadCertificate = "bad certificate" // go1.24 / TLS 1.2 + alertHandshakeFailure = "handshake failure" // go1.25 / TLS 1.3 + ) + + // TODO(thaJeztah): see if we can use errors.As for a [crypto/tls.AlertError] instead of bare string matching. + if cli.scheme == "https" && (strings.Contains(err.Error(), alertHandshakeFailure) || strings.Contains(err.Error(), alertBadCertificate)) { return nil, errConnectionFailed{fmt.Errorf("the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings: %w", err)} } diff --git a/vendor/modules.txt b/vendor/modules.txt index b9f0a1102f67..1ccd13f8b84b 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.20250923190348-e98849831fc4 +# github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d ## explicit; go 1.23.0 github.com/moby/moby/api/pkg/authconfig github.com/moby/moby/api/pkg/progress @@ -194,7 +194,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.20250923190348-e98849831fc4 +# github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d ## explicit; go 1.23.0 github.com/moby/moby/client github.com/moby/moby/client/internal/timestamp