Skip to content

Commit

Permalink
Fixed some deprecation warnings (#2607)
Browse files Browse the repository at this point in the history
* Fixed some deprecation warnings

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: update deps

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
  • Loading branch information
matejvasek authored Dec 3, 2024
1 parent 582536f commit 0742d9b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/buildpacks/pack v0.36.0
github.com/chainguard-dev/git-urls v1.0.2
github.com/cloudevents/sdk-go/v2 v2.15.2
github.com/containerd/containerd v1.7.23
github.com/containerd/platforms v0.2.1
github.com/containers/image/v5 v5.31.1
github.com/coreos/go-semver v0.3.1
github.com/creack/pty v1.1.21
Expand Down Expand Up @@ -121,7 +121,6 @@ require (
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/errdefs v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containerd/typeurl/v2 v2.2.0 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,6 @@ github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWH
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0=
github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0=
github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ=
github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw=
github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4=
github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
Expand Down
2 changes: 1 addition & 1 deletion pkg/docker/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package docker
import (
"fmt"

"github.com/containerd/containerd/platforms"
"github.com/containerd/platforms"
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
Expand Down
2 changes: 1 addition & 1 deletion pkg/docker/pusher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (m *mockPusherDockerClient) ImageSave(ctx context.Context, strings []string
return m.imageSave(ctx, strings)
}

func (m *mockPusherDockerClient) ImageLoad(ctx context.Context, reader io.Reader, b bool) (types.ImageLoadResponse, error) {
func (m *mockPusherDockerClient) ImageLoad(ctx context.Context, reader io.Reader, b bool) (api.LoadResponse, error) {
panic("implement me")
}

Expand Down
40 changes: 20 additions & 20 deletions pkg/docker/zz_close_guarding_client_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (c *closeGuardingClient) ContainerDiff(arg0 context.Context, arg1 string) (
return c.pimpl.ContainerDiff(arg0, arg1)
}

func (c *closeGuardingClient) ContainerExecAttach(arg0 context.Context, arg1 string, arg2 types.ExecStartCheck) (types.HijackedResponse, error) {
func (c *closeGuardingClient) ContainerExecAttach(arg0 context.Context, arg1 string, arg2 container.ExecAttachOptions) (types.HijackedResponse, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -136,7 +136,7 @@ func (c *closeGuardingClient) ContainerExecAttach(arg0 context.Context, arg1 str
return c.pimpl.ContainerExecAttach(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerExecCreate(arg0 context.Context, arg1 string, arg2 types.ExecConfig) (types.IDResponse, error) {
func (c *closeGuardingClient) ContainerExecCreate(arg0 context.Context, arg1 string, arg2 container.ExecOptions) (types.IDResponse, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -145,7 +145,7 @@ func (c *closeGuardingClient) ContainerExecCreate(arg0 context.Context, arg1 str
return c.pimpl.ContainerExecCreate(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerExecInspect(arg0 context.Context, arg1 string) (types.ContainerExecInspect, error) {
func (c *closeGuardingClient) ContainerExecInspect(arg0 context.Context, arg1 string) (container.ExecInspect, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -163,7 +163,7 @@ func (c *closeGuardingClient) ContainerExecResize(arg0 context.Context, arg1 str
return c.pimpl.ContainerExecResize(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerExecStart(arg0 context.Context, arg1 string, arg2 types.ExecStartCheck) error {
func (c *closeGuardingClient) ContainerExecStart(arg0 context.Context, arg1 string, arg2 container.ExecStartOptions) error {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -280,7 +280,7 @@ func (c *closeGuardingClient) ContainerStart(arg0 context.Context, arg1 string,
return c.pimpl.ContainerStart(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerStatPath(arg0 context.Context, arg1 string, arg2 string) (types.ContainerPathStat, error) {
func (c *closeGuardingClient) ContainerStatPath(arg0 context.Context, arg1 string, arg2 string) (container.PathStat, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -289,7 +289,7 @@ func (c *closeGuardingClient) ContainerStatPath(arg0 context.Context, arg1 strin
return c.pimpl.ContainerStatPath(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerStats(arg0 context.Context, arg1 string, arg2 bool) (types.ContainerStats, error) {
func (c *closeGuardingClient) ContainerStats(arg0 context.Context, arg1 string, arg2 bool) (container.StatsResponseReader, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -298,7 +298,7 @@ func (c *closeGuardingClient) ContainerStats(arg0 context.Context, arg1 string,
return c.pimpl.ContainerStats(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainerStatsOneShot(arg0 context.Context, arg1 string) (types.ContainerStats, error) {
func (c *closeGuardingClient) ContainerStatsOneShot(arg0 context.Context, arg1 string) (container.StatsResponseReader, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -352,7 +352,7 @@ func (c *closeGuardingClient) ContainerWait(arg0 context.Context, arg1 string, a
return c.pimpl.ContainerWait(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ContainersPrune(arg0 context.Context, arg1 filters.Args) (types.ContainersPruneReport, error) {
func (c *closeGuardingClient) ContainersPrune(arg0 context.Context, arg1 filters.Args) (container.PruneReport, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -361,7 +361,7 @@ func (c *closeGuardingClient) ContainersPrune(arg0 context.Context, arg1 filters
return c.pimpl.ContainersPrune(arg0, arg1)
}

func (c *closeGuardingClient) CopyFromContainer(arg0 context.Context, arg1 string, arg2 string) (io.ReadCloser, types.ContainerPathStat, error) {
func (c *closeGuardingClient) CopyFromContainer(arg0 context.Context, arg1 string, arg2 string) (io.ReadCloser, container.PathStat, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -370,7 +370,7 @@ func (c *closeGuardingClient) CopyFromContainer(arg0 context.Context, arg1 strin
return c.pimpl.CopyFromContainer(arg0, arg1, arg2)
}

func (c *closeGuardingClient) CopyToContainer(arg0 context.Context, arg1 string, arg2 string, arg3 io.Reader, arg4 types.CopyToContainerOptions) error {
func (c *closeGuardingClient) CopyToContainer(arg0 context.Context, arg1 string, arg2 string, arg3 io.Reader, arg4 container.CopyToContainerOptions) error {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -424,7 +424,7 @@ func (c *closeGuardingClient) DistributionInspect(arg0 context.Context, arg1 str
return c.pimpl.DistributionInspect(arg0, arg1, arg2)
}

func (c *closeGuardingClient) Events(arg0 context.Context, arg1 types.EventsOptions) (<-chan events.Message, <-chan error) {
func (c *closeGuardingClient) Events(arg0 context.Context, arg1 events.ListOptions) (<-chan events.Message, <-chan error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -496,7 +496,7 @@ func (c *closeGuardingClient) ImageList(arg0 context.Context, arg1 image.ListOpt
return c.pimpl.ImageList(arg0, arg1)
}

func (c *closeGuardingClient) ImageLoad(arg0 context.Context, arg1 io.Reader, arg2 bool) (types.ImageLoadResponse, error) {
func (c *closeGuardingClient) ImageLoad(arg0 context.Context, arg1 io.Reader, arg2 bool) (image.LoadResponse, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -541,7 +541,7 @@ func (c *closeGuardingClient) ImageSave(arg0 context.Context, arg1 []string) (io
return c.pimpl.ImageSave(arg0, arg1)
}

func (c *closeGuardingClient) ImageSearch(arg0 context.Context, arg1 string, arg2 types.ImageSearchOptions) ([]registry.SearchResult, error) {
func (c *closeGuardingClient) ImageSearch(arg0 context.Context, arg1 string, arg2 registry.SearchOptions) ([]registry.SearchResult, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -559,7 +559,7 @@ func (c *closeGuardingClient) ImageTag(arg0 context.Context, arg1 string, arg2 s
return c.pimpl.ImageTag(arg0, arg1, arg2)
}

func (c *closeGuardingClient) ImagesPrune(arg0 context.Context, arg1 filters.Args) (types.ImagesPruneReport, error) {
func (c *closeGuardingClient) ImagesPrune(arg0 context.Context, arg1 filters.Args) (image.PruneReport, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -604,7 +604,7 @@ func (c *closeGuardingClient) NetworkConnect(arg0 context.Context, arg1 string,
return c.pimpl.NetworkConnect(arg0, arg1, arg2, arg3)
}

func (c *closeGuardingClient) NetworkCreate(arg0 context.Context, arg1 string, arg2 types.NetworkCreate) (types.NetworkCreateResponse, error) {
func (c *closeGuardingClient) NetworkCreate(arg0 context.Context, arg1 string, arg2 network.CreateOptions) (network.CreateResponse, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -622,7 +622,7 @@ func (c *closeGuardingClient) NetworkDisconnect(arg0 context.Context, arg1 strin
return c.pimpl.NetworkDisconnect(arg0, arg1, arg2, arg3)
}

func (c *closeGuardingClient) NetworkInspect(arg0 context.Context, arg1 string, arg2 types.NetworkInspectOptions) (types.NetworkResource, error) {
func (c *closeGuardingClient) NetworkInspect(arg0 context.Context, arg1 string, arg2 network.InspectOptions) (network.Inspect, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -631,7 +631,7 @@ func (c *closeGuardingClient) NetworkInspect(arg0 context.Context, arg1 string,
return c.pimpl.NetworkInspect(arg0, arg1, arg2)
}

func (c *closeGuardingClient) NetworkInspectWithRaw(arg0 context.Context, arg1 string, arg2 types.NetworkInspectOptions) (types.NetworkResource, []uint8, error) {
func (c *closeGuardingClient) NetworkInspectWithRaw(arg0 context.Context, arg1 string, arg2 network.InspectOptions) (network.Inspect, []uint8, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -640,7 +640,7 @@ func (c *closeGuardingClient) NetworkInspectWithRaw(arg0 context.Context, arg1 s
return c.pimpl.NetworkInspectWithRaw(arg0, arg1, arg2)
}

func (c *closeGuardingClient) NetworkList(arg0 context.Context, arg1 types.NetworkListOptions) ([]types.NetworkResource, error) {
func (c *closeGuardingClient) NetworkList(arg0 context.Context, arg1 network.ListOptions) ([]network.Summary, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand All @@ -658,7 +658,7 @@ func (c *closeGuardingClient) NetworkRemove(arg0 context.Context, arg1 string) e
return c.pimpl.NetworkRemove(arg0, arg1)
}

func (c *closeGuardingClient) NetworksPrune(arg0 context.Context, arg1 filters.Args) (types.NetworksPruneReport, error) {
func (c *closeGuardingClient) NetworksPrune(arg0 context.Context, arg1 filters.Args) (network.PruneReport, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down Expand Up @@ -1054,7 +1054,7 @@ func (c *closeGuardingClient) VolumeRemove(arg0 context.Context, arg1 string, ar
return c.pimpl.VolumeRemove(arg0, arg1, arg2)
}

func (c *closeGuardingClient) VolumesPrune(arg0 context.Context, arg1 filters.Args) (types.VolumesPruneReport, error) {
func (c *closeGuardingClient) VolumesPrune(arg0 context.Context, arg1 filters.Args) (volume.PruneReport, error) {
c.m.RLock()
defer c.m.RUnlock()
if c.closed {
Expand Down

0 comments on commit 0742d9b

Please sign in to comment.