Skip to content

Commit ca28e2e

Browse files
committed
vendor: github.com/moby/moby/api v1.52-beta.2, moby/client v0.1.0-beta.2
full diffs: - moby/moby@api/v1.52.0-beta.1...v1.52-beta.2 - moby/moby@client/v0.1.0-beta.0...v0.1.0-beta.2 Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 1414efe commit ca28e2e

File tree

124 files changed

+1289
-1813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1289
-1813
lines changed

commands/diskusage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func runDiskUsage(ctx context.Context, dockerCli command.Cli, opts duOptions) er
169169
}
170170

171171
defer func() {
172-
if (fctx.Format != duDefaultTableFormat && fctx.Format != duDefaultPrettyTemplate) || fctx.Format.IsJSON() || opts.filter.Value().Len() > 0 {
172+
if (fctx.Format != duDefaultTableFormat && fctx.Format != duDefaultPrettyTemplate) || fctx.Format.IsJSON() || len(opts.filter.Value()) > 0 {
173173
return
174174
}
175175
printSummary(dockerCli.Out(), out)

commands/prune.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"context"
55
"fmt"
66
"io"
7+
"maps"
78
"os"
9+
"slices"
810
"strings"
911
"text/tabwriter"
1012
"time"
@@ -19,7 +21,7 @@ import (
1921
gateway "github.com/moby/buildkit/frontend/gateway/client"
2022
pb "github.com/moby/buildkit/solver/pb"
2123
"github.com/moby/buildkit/util/apicaps"
22-
"github.com/moby/moby/api/types/filters"
24+
dclient "github.com/moby/moby/client"
2325
"github.com/pkg/errors"
2426
"github.com/spf13/cobra"
2527
"golang.org/x/sync/errgroup"
@@ -42,9 +44,7 @@ const (
4244
)
4345

4446
func runPrune(ctx context.Context, dockerCli command.Cli, opts pruneOptions) error {
45-
pruneFilters := opts.filter.Value()
46-
pruneFilters = command.PruneFilters(dockerCli, pruneFilters)
47-
47+
pruneFilters := command.PruneFilters(dockerCli, opts.filter.Value())
4848
pi, err := toBuildkitPruneInfo(pruneFilters)
4949
if err != nil {
5050
return err
@@ -189,20 +189,22 @@ func pruneCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
189189
return cmd
190190
}
191191

192-
func toBuildkitPruneInfo(f filters.Args) (*client.PruneInfo, error) {
193-
var until time.Duration
194-
untilValues := f.Get("until") // canonical
195-
unusedForValues := f.Get("unused-for") // deprecated synonym for "until" filter
192+
// getFilter returns the list of values associated with the key
193+
func getFilter(f dclient.Filters, key string) []string {
194+
return slices.Collect(maps.Keys(f[key]))
195+
}
196196

197-
if len(untilValues) > 0 && len(unusedForValues) > 0 {
198-
return nil, errors.Errorf("conflicting filters %q and %q", "until", "unused-for")
197+
func toBuildkitPruneInfo(pruneFilters dclient.Filters) (*client.PruneInfo, error) {
198+
var until time.Duration
199+
if len(pruneFilters["until"]) > 0 && len(pruneFilters["unused-for"]) > 0 {
200+
return nil, errors.New(`conflicting filters "until" and "unused-for"`)
199201
}
200202
untilKey := "until"
201-
if len(unusedForValues) > 0 {
202-
untilKey = "unused-for"
203+
if len(pruneFilters["unused-for"]) > 0 {
204+
untilKey = "unused-for" // deprecated synonym for "until" filter
203205
}
204-
untilValues = append(untilValues, unusedForValues...)
205206

207+
untilValues := getFilter(pruneFilters, untilKey)
206208
switch len(untilValues) {
207209
case 0:
208210
// nothing to do
@@ -213,16 +215,16 @@ func toBuildkitPruneInfo(f filters.Args) (*client.PruneInfo, error) {
213215
return nil, errors.Wrapf(err, "%q filter expects a duration (e.g., '24h')", untilKey)
214216
}
215217
default:
216-
return nil, errors.Errorf("filters expect only one value")
218+
return nil, errors.Errorf("%q filter expects only one value", untilKey)
217219
}
218220

219-
filters := make([]string, 0, f.Len())
220-
for _, filterKey := range f.Keys() {
221+
filters := make([]string, 0, len(pruneFilters))
222+
for filterKey := range pruneFilters {
221223
if filterKey == untilKey {
222224
continue
223225
}
224226

225-
values := f.Get(filterKey)
227+
values := getFilter(pruneFilters, filterKey)
226228
switch len(values) {
227229
case 0:
228230
filters = append(filters, filterKey)
@@ -235,7 +237,7 @@ func toBuildkitPruneInfo(f filters.Args) (*client.PruneInfo, error) {
235237
filters = append(filters, filterKey+"=="+values[0])
236238
}
237239
default:
238-
return nil, errors.Errorf("filters expect only one value")
240+
return nil, errors.Errorf("%q filter expects only one value", filterKey)
239241
}
240242
}
241243
return &client.PruneInfo{

driver/docker-container/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (d *Driver) copyToContainer(ctx context.Context, files map[string][]byte) e
299299
}
300300

301301
func (d *Driver) exec(ctx context.Context, cmd []string) (string, net.Conn, error) {
302-
response, err := d.DockerAPI.ContainerExecCreate(ctx, d.Name, container.ExecOptions{
302+
response, err := d.DockerAPI.ContainerExecCreate(ctx, d.Name, dockerclient.ExecCreateOptions{
303303
Cmd: cmd,
304304
AttachStdin: true,
305305
AttachStdout: true,
@@ -314,7 +314,7 @@ func (d *Driver) exec(ctx context.Context, cmd []string) (string, net.Conn, erro
314314
return "", nil, errors.New("exec ID empty")
315315
}
316316

317-
resp, err := d.DockerAPI.ContainerExecAttach(ctx, execID, container.ExecStartOptions{})
317+
resp, err := d.DockerAPI.ContainerExecAttach(ctx, execID, dockerclient.ExecStartOptions{})
318318
if err != nil {
319319
return "", nil, err
320320
}

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/docker/buildx
22

33
go 1.24.0
44

5-
replace github.com/docker/cli => github.com/docker/cli v28.3.4-0.20250905221807-be97096566f2+incompatible // master
6-
75
require (
86
github.com/Masterminds/semver/v3 v3.4.0
97
github.com/Microsoft/go-winio v0.6.2
@@ -18,7 +16,7 @@ require (
1816
github.com/creack/pty v1.1.24
1917
github.com/davecgh/go-spew v1.1.1
2018
github.com/distribution/reference v0.6.0
21-
github.com/docker/cli v28.5.1+incompatible
19+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible // master / v29.0.0-dev
2220
github.com/docker/cli-docs-tool v0.10.0
2321
github.com/docker/go-units v0.5.0
2422
github.com/gofrs/flock v0.12.1
@@ -32,8 +30,8 @@ require (
3230
github.com/mitchellh/hashstructure/v2 v2.0.2
3331
github.com/moby/buildkit v0.25.0-rc1.0.20251011181741-9b6f60ac8bf9
3432
github.com/moby/go-archive v0.1.0
35-
github.com/moby/moby/api v1.52.0-beta.1
36-
github.com/moby/moby/client v0.1.0-beta.0
33+
github.com/moby/moby/api v1.52.0-beta.2
34+
github.com/moby/moby/client v0.1.0-beta.2
3735
github.com/moby/sys/atomicwriter v0.1.0
3836
github.com/moby/sys/mountinfo v0.7.2
3937
github.com/morikuni/aec v1.0.0

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
109109
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
110110
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
111111
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
112-
github.com/docker/cli v28.3.4-0.20250905221807-be97096566f2+incompatible h1:DLnj6JeVS3rJK1dNkgKEmbdWT6MfHjVDMVw0gp1vP3Q=
113-
github.com/docker/cli v28.3.4-0.20250905221807-be97096566f2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
112+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible h1:G2VeAxjFsbWMhTgf2qE908e32M040txrCkHYzsYCRTo=
113+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
114114
github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU=
115115
github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U=
116116
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@@ -261,10 +261,10 @@ github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ
261261
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
262262
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
263263
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
264-
github.com/moby/moby/api v1.52.0-beta.1 h1:r5U4U72E7xSHh4zX72ndY1mA/FOGiAPiGiz2a8rBW+w=
265-
github.com/moby/moby/api v1.52.0-beta.1/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok=
266-
github.com/moby/moby/client v0.1.0-beta.0 h1:eXzrwi0YkzLvezOBKHafvAWNmH1B9HFh4n13yb2QgFE=
267-
github.com/moby/moby/client v0.1.0-beta.0/go.mod h1:irAv8jRi4yKKBeND96Y+3AM9ers+KaJYk9Vmcm7loxs=
264+
github.com/moby/moby/api v1.52.0-beta.2 h1:cuilbu4cLBZnlNpJXuv3QTleOxgo3kGqkNGt3ICe1yY=
265+
github.com/moby/moby/api v1.52.0-beta.2/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s=
266+
github.com/moby/moby/client v0.1.0-beta.2 h1:Uy7JhcAOvQAQriowODpHaAJokfw/AhUya0216sk1hAk=
267+
github.com/moby/moby/client v0.1.0-beta.2/go.mod h1:yYEv2G6pYi8u63ga0zlU9KsM7DpoGXubtMaZMJE7/dw=
268268
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
269269
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
270270
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=

vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go

Lines changed: 17 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/cli/cli/command/cli.go

Lines changed: 14 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)