Skip to content

Commit

Permalink
fix(deps): update module github.com/docker/docker to v26
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and acouvreur committed May 30, 2024
1 parent bf8c495 commit ab98761
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
16 changes: 8 additions & 8 deletions app/providers/docker_classic.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ func NewDockerClassicProvider() (*DockerClassicProvider, error) {
}

func (provider *DockerClassicProvider) GetGroups(ctx context.Context) (map[string][]string, error) {
filters := filters.NewArgs()
filters.Add("label", fmt.Sprintf("%s=true", enableLabel))
args := filters.NewArgs()
args.Add("label", fmt.Sprintf("%s=true", enableLabel))

containers, err := provider.Client.ContainerList(ctx, types.ContainerListOptions{
containers, err := provider.Client.ContainerList(ctx, container.ListOptions{
All: true,
Filters: filters,
Filters: args,
})

if err != nil {
return nil, err
}

groups := make(map[string][]string)
for _, container := range containers {
groupName := container.Labels[groupLabel]
for _, c := range containers {
groupName := c.Labels[groupLabel]
if len(groupName) == 0 {
groupName = defaultGroupValue
}
group := groups[groupName]
group = append(group, strings.TrimPrefix(container.Names[0], "/"))
group = append(group, strings.TrimPrefix(c.Names[0], "/"))
groups[groupName] = group
}

Expand All @@ -65,7 +65,7 @@ func (provider *DockerClassicProvider) GetGroups(ctx context.Context) (map[strin
}

func (provider *DockerClassicProvider) Start(ctx context.Context, name string) (instance.State, error) {
err := provider.Client.ContainerStart(ctx, name, types.ContainerStartOptions{})
err := provider.Client.ContainerStart(ctx, name, container.StartOptions{})

if err != nil {
return instance.ErrorInstanceState(name, err, provider.desiredReplicas)
Expand Down
6 changes: 3 additions & 3 deletions app/providers/mocks/client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewDockerAPIClientMockWithEvents(messages []events.Message, errors []error)
}
}

func (client *DockerAPIClientMock) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error {
func (client *DockerAPIClientMock) ContainerStart(ctx context.Context, container string, options container.StartOptions) error {
args := client.Mock.Called(ctx, container, options)
return args.Error(0)
}
Expand Down Expand Up @@ -197,9 +197,9 @@ func ContainerStoppedEvent(name string) events.Message {
}
}

func (client *DockerAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) {
func (client *DockerAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (swarm.ServiceUpdateResponse, error) {
args := client.Mock.Called(ctx, serviceID, version, service, options)
return args.Get(0).(types.ServiceUpdateResponse), args.Error(1)
return args.Get(0).(swarm.ServiceUpdateResponse), args.Error(1)
}

func (client *DockerAPIClientMock) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) {
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
replace github.com/gavv/httpexpect/v2 => github.com/acouvreur/httpexpect/v2 v2.16.0

require (
github.com/docker/docker v25.0.5+incompatible
github.com/docker/docker v26.1.3+incompatible
github.com/gavv/httpexpect/v2 v2.15.0
github.com/gin-gonic/gin v1.10.0
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -74,6 +74,7 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/docker/docker v25.0.4+incompatible h1:XITZTrq+52tZyZxUOtFIahUf3aH367F
github.com/docker/docker v25.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
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/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/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
Expand Down Expand Up @@ -173,6 +175,8 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
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/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down

0 comments on commit ab98761

Please sign in to comment.