From b96cb87017f6398684deb2c267e55d47652320da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 May 2025 16:55:06 +0000 Subject: [PATCH 1/2] Bump the docker group with 5 updates Bumps the docker group with 5 updates: | Package | From | To | | --- | --- | --- | | [github.com/docker/cli](https://github.com/docker/cli) | `27.5.1+incompatible` | `28.1.1+incompatible` | | [github.com/docker/docker](https://github.com/docker/docker) | `27.5.1+incompatible` | `28.1.1+incompatible` | | [github.com/moby/moby](https://github.com/moby/moby) | `27.5.1+incompatible` | `28.1.1+incompatible` | | [github.com/docker/docker-credential-helpers](https://github.com/docker/docker-credential-helpers) | `0.8.2` | `0.9.3` | | [github.com/moby/sys/user](https://github.com/moby/sys) | `0.3.0` | `0.4.0` | Updates `github.com/docker/cli` from 27.5.1+incompatible to 28.1.1+incompatible - [Commits](https://github.com/docker/cli/compare/v27.5.1...v28.1.1) Updates `github.com/docker/docker` from 27.5.1+incompatible to 28.1.1+incompatible - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v27.5.1...v28.1.1) Updates `github.com/moby/moby` from 27.5.1+incompatible to 28.1.1+incompatible - [Release notes](https://github.com/moby/moby/releases) - [Commits](https://github.com/moby/moby/compare/v27.5.1...v28.1.1) Updates `github.com/docker/docker-credential-helpers` from 0.8.2 to 0.9.3 - [Release notes](https://github.com/docker/docker-credential-helpers/releases) - [Commits](https://github.com/docker/docker-credential-helpers/compare/v0.8.2...v0.9.3) Updates `github.com/moby/sys/user` from 0.3.0 to 0.4.0 - [Release notes](https://github.com/moby/sys/releases) - [Commits](https://github.com/moby/sys/compare/user/v0.3.0...user/v0.4.0) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-version: 28.1.1+incompatible dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker - dependency-name: github.com/docker/docker dependency-version: 28.1.1+incompatible dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker - dependency-name: github.com/moby/moby dependency-version: 28.1.1+incompatible dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker - dependency-name: github.com/docker/docker-credential-helpers dependency-version: 0.9.3 dependency-type: indirect update-type: version-update:semver-minor dependency-group: docker - dependency-name: github.com/moby/sys/user dependency-version: 0.4.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: docker ... Signed-off-by: dependabot[bot] --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++++------------ 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 9563c888..04d6803f 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,12 @@ go 1.24 require ( github.com/MakeNowJust/heredoc v1.0.0 - github.com/docker/cli v27.5.1+incompatible - github.com/docker/docker v27.5.1+incompatible + github.com/docker/cli v28.1.1+incompatible + github.com/docker/docker v28.1.1+incompatible github.com/google/go-containerregistry v0.20.3 github.com/goware/prefixer v0.0.0-20160118172347-395022866408 github.com/hexops/gotextdiff v1.0.3 - github.com/moby/moby v27.5.1+incompatible + github.com/moby/moby v28.1.1+incompatible github.com/moby/sys/signal v0.7.1 github.com/spf13/cobra v1.9.1 gopkg.in/yaml.v3 v3.0.1 @@ -17,7 +17,6 @@ require ( ) require ( - github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -25,7 +24,7 @@ require ( github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker-credential-helpers v0.8.2 // indirect + github.com/docker/docker-credential-helpers v0.9.3 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -36,9 +35,11 @@ require ( github.com/klauspost/compress v1.18.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/go-archive v0.1.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/atomicwriter v0.1.0 // indirect github.com/moby/sys/sequential v0.6.0 // indirect - github.com/moby/sys/user v0.3.0 // indirect + github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -59,5 +60,4 @@ require ( golang.org/x/time v0.11.0 // indirect golang.org/x/tools v0.33.0 // indirect google.golang.org/protobuf v1.36.6 // indirect - gotest.tools/v3 v3.5.2 // indirect ) diff --git a/go.sum b/go.sum index 58e207c6..6a6f11ed 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -20,14 +20,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v27.5.1+incompatible h1:JB9cieUT9YNiMITtIsguaN55PLOHhBSz3LKVc6cqWaY= -github.com/docker/cli v27.5.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k= +github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8= -github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= -github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= +github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= +github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= +github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -67,16 +67,20 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/moby v27.5.1+incompatible h1:/pN59F/t3U7Q4FPzV88nzqf7Fp0qqCSL2KzhZaiKcKw= -github.com/moby/moby v27.5.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +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 v28.1.1+incompatible h1:lyEaGTiUhIdXRUv/vPamckAbPt5LcPQkeHmwAHN98eQ= +github.com/moby/moby v28.1.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= 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/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/sys/signal v0.7.1 h1:PrQxdvxcGijdo6UXXo/lU/TvHUWyPhj7UOpSo8tuvk0= github.com/moby/sys/signal v0.7.1/go.mod h1:Se1VGehYokAkrSQwL4tDzHvETwUZlnY7S5XtQ50mQp8= -github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= -github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= From 1cd0ae1987d565aa5e0abb285254aa6c75ef18b0 Mon Sep 17 00:00:00 2001 From: Jake Coffman Date: Thu, 29 May 2025 15:32:24 -0500 Subject: [PATCH 2/2] fix breaking changes --- internal/infra/network.go | 13 ++++++------- internal/infra/open_telemetry.go | 5 ++--- internal/infra/proxy.go | 5 ++--- internal/infra/run.go | 6 +++--- internal/infra/tty.go | 2 +- internal/infra/updater.go | 13 ++++++------- 6 files changed, 20 insertions(+), 24 deletions(-) diff --git a/internal/infra/network.go b/internal/infra/network.go index 5eabc6f6..16e687b8 100644 --- a/internal/infra/network.go +++ b/internal/infra/network.go @@ -3,15 +3,14 @@ package infra import ( "context" "fmt" - - "github.com/docker/docker/api/types" - "github.com/moby/moby/client" + "github.com/docker/docker/api/types/network" + "github.com/docker/docker/client" "github.com/moby/moby/pkg/namesgenerator" ) type Networks struct { - NoInternet types.NetworkCreateResponse - Internet types.NetworkCreateResponse + NoInternet network.CreateResponse + Internet network.CreateResponse cli *client.Client noInternetName string internetName string @@ -21,7 +20,7 @@ func NewNetworks(ctx context.Context, cli *client.Client) (*Networks, error) { const bridge = "bridge" noInternetName := namesgenerator.GetRandomName(1) - noInternet, err := cli.NetworkCreate(ctx, noInternetName, types.NetworkCreate{ + noInternet, err := cli.NetworkCreate(ctx, noInternetName, network.CreateOptions{ Internal: true, Driver: bridge, }) @@ -30,7 +29,7 @@ func NewNetworks(ctx context.Context, cli *client.Client) (*Networks, error) { } internetName := namesgenerator.GetRandomName(1) - internet, err := cli.NetworkCreate(ctx, internetName, types.NetworkCreate{ + internet, err := cli.NetworkCreate(ctx, internetName, network.CreateOptions{ Driver: bridge, }) if err != nil { diff --git a/internal/infra/open_telemetry.go b/internal/infra/open_telemetry.go index 1f4a7c32..6c3b0500 100644 --- a/internal/infra/open_telemetry.go +++ b/internal/infra/open_telemetry.go @@ -9,12 +9,11 @@ import ( "path" "path/filepath" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/client" "github.com/goware/prefixer" - "github.com/moby/moby/client" "github.com/moby/moby/pkg/stdcopy" ) @@ -81,7 +80,7 @@ func NewCollector(ctx context.Context, cli *client.Client, net *Networks, params containerID: collectorContainer.ID, } - opt := types.CopyToContainerOptions{} + opt := container.CopyToContainerOptions{} if t, err := tarball(sslCertificates, proxy.ca.Cert); err != nil { return nil, fmt.Errorf("failed to create cert tarball: %w", err) } else if err = cli.CopyToContainer(ctx, collector.containerID, "/", t, opt); err != nil { diff --git a/internal/infra/proxy.go b/internal/infra/proxy.go index 97c90e81..96a67cdd 100644 --- a/internal/infra/proxy.go +++ b/internal/infra/proxy.go @@ -4,12 +4,11 @@ import ( "context" "encoding/json" "fmt" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/client" "github.com/goware/prefixer" - "github.com/moby/moby/client" "github.com/moby/moby/pkg/namesgenerator" "github.com/moby/moby/pkg/stdcopy" "io" @@ -137,7 +136,7 @@ func NewProxy(ctx context.Context, cli *client.Client, params *RunParams, nets * } func putProxyConfig(ctx context.Context, cli *client.Client, config *Config, id string) error { - opt := types.CopyToContainerOptions{} + opt := container.CopyToContainerOptions{} data, err := json.Marshal(config) if err != nil { diff --git a/internal/infra/run.go b/internal/infra/run.go index 6ed36fc3..4fb42d16 100644 --- a/internal/infra/run.go +++ b/internal/infra/run.go @@ -6,6 +6,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/docker/docker/api/types/container" "io" "log" "net/http" @@ -18,14 +19,13 @@ import ( "github.com/dependabot/cli/internal/model" "github.com/dependabot/cli/internal/server" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/image" + "github.com/docker/docker/client" "github.com/docker/docker/pkg/archive" "github.com/hexops/gotextdiff" "github.com/hexops/gotextdiff/myers" "github.com/hexops/gotextdiff/span" "github.com/moby/moby/api/types/registry" - "github.com/moby/moby/client" "gopkg.in/yaml.v3" ) @@ -477,7 +477,7 @@ func putCloneDir(ctx context.Context, cli *client.Client, updater *Updater, dir return fmt.Errorf("failed to tar clone dir: %w", err) } - opt := types.CopyToContainerOptions{} + opt := container.CopyToContainerOptions{} err = cli.CopyToContainer(ctx, updater.containerID, guestRepoDir, r, opt) if err != nil { return fmt.Errorf("failed to copy clone dir to container: %w", err) diff --git a/internal/infra/tty.go b/internal/infra/tty.go index 6baf2b1b..04de6d96 100644 --- a/internal/infra/tty.go +++ b/internal/infra/tty.go @@ -10,7 +10,7 @@ import ( "time" "github.com/docker/cli/cli/streams" - "github.com/moby/moby/client" + "github.com/docker/docker/client" "github.com/moby/sys/signal" ) diff --git a/internal/infra/updater.go b/internal/infra/updater.go index d59d2862..7c9a5b52 100644 --- a/internal/infra/updater.go +++ b/internal/infra/updater.go @@ -14,12 +14,11 @@ import ( "github.com/dependabot/cli/internal/model" "github.com/docker/cli/cli/streams" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/client" "github.com/goware/prefixer" - "github.com/moby/moby/client" "github.com/moby/moby/pkg/stdcopy" ) @@ -115,7 +114,7 @@ func NewUpdater(ctx context.Context, cli *client.Client, net *Networks, params * } func putUpdaterInputs(ctx context.Context, cli *client.Client, cert, id string, job *model.Job) error { - opt := types.CopyToContainerOptions{} + opt := container.CopyToContainerOptions{} if t, err := tarball(dbotCert, cert); err != nil { return fmt.Errorf("failed to create cert tarball: %w", err) } else if err = cli.CopyToContainer(ctx, id, "/", t, opt); err != nil { @@ -177,7 +176,7 @@ func userEnv(proxyURL string, apiUrl string) []string { // RunShell executes an interactive shell, blocks until complete. func (u *Updater) RunShell(ctx context.Context, proxyURL string, apiUrl string) error { - execCreate, err := u.cli.ContainerExecCreate(ctx, u.containerID, types.ExecConfig{ + execCreate, err := u.cli.ContainerExecCreate(ctx, u.containerID, container.ExecOptions{ AttachStdin: true, AttachStdout: true, AttachStderr: true, @@ -192,7 +191,7 @@ func (u *Updater) RunShell(ctx context.Context, proxyURL string, apiUrl string) ctx, cancel := context.WithCancel(ctx) defer cancel() - execResp, err := u.cli.ContainerExecAttach(ctx, execCreate.ID, types.ExecStartCheck{}) + execResp, err := u.cli.ContainerExecAttach(ctx, execCreate.ID, container.ExecAttachOptions{}) if err != nil { return fmt.Errorf("failed to start exec: %w", err) } @@ -233,7 +232,7 @@ func (u *Updater) RunShell(ctx context.Context, proxyURL string, apiUrl string) // RunCmd executes the update scripts as the dependabot user, blocks until complete. func (u *Updater) RunCmd(ctx context.Context, cmd, user string, env ...string) error { - execCreate, err := u.cli.ContainerExecCreate(ctx, u.containerID, types.ExecConfig{ + execCreate, err := u.cli.ContainerExecCreate(ctx, u.containerID, container.ExecOptions{ AttachStdout: true, AttachStderr: true, User: user, @@ -244,7 +243,7 @@ func (u *Updater) RunCmd(ctx context.Context, cmd, user string, env ...string) e return fmt.Errorf("failed to create exec: %w", err) } - execResp, err := u.cli.ContainerExecAttach(ctx, execCreate.ID, types.ExecStartCheck{}) + execResp, err := u.cli.ContainerExecAttach(ctx, execCreate.ID, container.ExecAttachOptions{}) if err != nil { return fmt.Errorf("failed to start exec: %w", err) }