Skip to content

Commit

Permalink
Merge pull request #919 from traPtitech/dependabot/go_modules/github.…
Browse files Browse the repository at this point in the history
…com/docker/cli-26.1.3incompatible

build(deps): bump github.com/docker/cli from 25.0.3+incompatible to 26.1.3+incompatible
  • Loading branch information
motoki317 authored Jun 1, 2024
2 parents 04d36b8 + 768959e commit 870abf8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ require (
connectrpc.com/connect v1.16.2
github.com/aws/aws-sdk-go v1.53.14
github.com/cert-manager/cert-manager v1.14.5
github.com/docker/cli v25.0.3+incompatible
github.com/docker/docker v25.0.5+incompatible // should be in sync with requirements of github.com/moby/buildkit
github.com/docker/cli v26.1.3+incompatible
github.com/docker/docker v26.1.3+incompatible // should be in sync with requirements of github.com/moby/buildkit or build could break
github.com/docker/go-connections v0.5.0
github.com/friendsofgo/errors v0.9.2
github.com/gliderlabs/ssh v0.3.7
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6/EsX/6284=
github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/cli v26.1.3+incompatible h1:bUpXT/N0kDE3VUHI2r5VMsYQgi38kYuoC0oL9yt3lqc=
github.com/docker/cli v26.1.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo=
github.com/docker/docker v26.1.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8=
github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
Expand Down
4 changes: 2 additions & 2 deletions pkg/infrastructure/backend/dockerimpl/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"testing"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -35,7 +35,7 @@ func prepareManager(t *testing.T) (*Backend, *client.Client) {
err = m.Start(context.Background())
require.NoError(t, err)

res, err := c.ImagePull(context.Background(), "alpine:latest", types.ImagePullOptions{})
res, err := c.ImagePull(context.Background(), "alpine:latest", image.PullOptions{})
require.NoError(t, err)
_, err = io.ReadAll(res)
require.NoError(t, err)
Expand Down
3 changes: 2 additions & 1 deletion pkg/infrastructure/backend/dockerimpl/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/stdcopy"
"github.com/friendsofgo/errors"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -38,7 +39,7 @@ func streamHijackedResp(ctx context.Context, res types.HijackedResponse, stdin i
}

func (b *Backend) AttachContainer(ctx context.Context, appID string, stdin io.Reader, stdout, stderr io.Writer) error {
res, err := b.c.ContainerAttach(ctx, containerName(appID), types.ContainerAttachOptions{
res, err := b.c.ContainerAttach(ctx, containerName(appID), container.AttachOptions{
Stream: true,
Stdin: true,
Stdout: true,
Expand Down
5 changes: 3 additions & 2 deletions pkg/infrastructure/backend/dockerimpl/list_containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
"github.com/friendsofgo/errors"

Expand All @@ -14,7 +15,7 @@ import (
)

func (b *Backend) GetContainer(ctx context.Context, appID string) (*domain.Container, error) {
containers, err := b.c.ContainerList(ctx, types.ContainerListOptions{
containers, err := b.c.ContainerList(ctx, container.ListOptions{
All: true,
Filters: filters.NewArgs(
filters.Arg("label", fmt.Sprintf("%s=true", appLabel)),
Expand All @@ -40,7 +41,7 @@ func (b *Backend) GetContainer(ctx context.Context, appID string) (*domain.Conta
}

func (b *Backend) ListContainers(ctx context.Context) ([]*domain.Container, error) {
containers, err := b.c.ContainerList(ctx, types.ContainerListOptions{
containers, err := b.c.ContainerList(ctx, container.ListOptions{
All: true,
Filters: filters.NewArgs(
filters.Arg("label", fmt.Sprintf("%s=true", appLabel)),
Expand Down
4 changes: 2 additions & 2 deletions pkg/infrastructure/backend/dockerimpl/list_containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"testing"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -42,7 +42,7 @@ func TestDockerBackend_ListContainers(t *testing.T) {
ImageTag: "latest",
})
t.Cleanup(func() {
_ = c.ContainerRemove(context.Background(), containerName(app.ID), types.ContainerRemoveOptions{
_ = c.ContainerRemove(context.Background(), containerName(app.ID), container.RemoveOptions{
RemoveVolumes: true,
Force: true,
})
Expand Down
8 changes: 4 additions & 4 deletions pkg/infrastructure/backend/dockerimpl/synchronize_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (b *Backend) syncAppContainer(ctx context.Context, app *domain.RuntimeDesir
}

if oldContainer != nil {
err := b.c.ContainerRemove(ctx, oldContainer.ID, types.ContainerRemoveOptions{
err := b.c.ContainerRemove(ctx, oldContainer.ID, container.RemoveOptions{
RemoveVolumes: true,
Force: true,
})
Expand Down Expand Up @@ -117,7 +117,7 @@ func (b *Backend) syncAppContainer(ctx context.Context, app *domain.RuntimeDesir
return errors.Wrap(err, "failed to create container")
}

err = b.c.ContainerStart(ctx, cont.ID, types.ContainerStartOptions{})
err = b.c.ContainerStart(ctx, cont.ID, container.StartOptions{})
if err != nil {
return errors.Wrap(err, "failed to start container")
}
Expand All @@ -126,7 +126,7 @@ func (b *Backend) syncAppContainer(ctx context.Context, app *domain.RuntimeDesir

func (b *Backend) synchronizeRuntime(ctx context.Context, apps []*domain.RuntimeDesiredState) error {
// List old resources
oldContainers, err := b.c.ContainerList(ctx, types.ContainerListOptions{
oldContainers, err := b.c.ContainerList(ctx, container.ListOptions{
All: true,
Filters: filters.NewArgs(
filters.Arg("label", fmt.Sprintf("%s=true", appLabel)),
Expand Down Expand Up @@ -168,7 +168,7 @@ func (b *Backend) synchronizeRuntime(ctx context.Context, apps []*domain.Runtime
continue
}

err = b.c.ContainerRemove(ctx, oldContainer.ID, types.ContainerRemoveOptions{
err = b.c.ContainerRemove(ctx, oldContainer.ID, container.RemoveOptions{
RemoveVolumes: true,
Force: true,
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/infrastructure/backend/dockerimpl/synchronize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -64,7 +64,7 @@ func TestDockerBackend_CreateContainer(t *testing.T) {
assert.Equal(t, cont.Config.Labels[appLabel], "true")
assert.Equal(t, cont.Config.Labels[appIDLabel], appID)

require.NoError(t, c.ContainerRemove(context.Background(), cont.ID, types.ContainerRemoveOptions{
require.NoError(t, c.ContainerRemove(context.Background(), cont.ID, container.RemoveOptions{
RemoveVolumes: true,
Force: true,
}))
Expand Down Expand Up @@ -103,7 +103,7 @@ func TestDockerBackend_CreateContainer(t *testing.T) {
assert.Equal(t, cont.Config.Labels[appLabel], "true")
assert.Equal(t, cont.Config.Labels[appIDLabel], appID)

require.NoError(t, c.ContainerRemove(context.Background(), cont.ID, types.ContainerRemoveOptions{
require.NoError(t, c.ContainerRemove(context.Background(), cont.ID, container.RemoveOptions{
RemoveVolumes: true,
Force: true,
}))
Expand Down

0 comments on commit 870abf8

Please sign in to comment.