From 0742d9be96ab3e3679762805a8bec7acc54d0b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Va=C5=A1ek?= Date: Tue, 3 Dec 2024 09:40:44 +0100 Subject: [PATCH] Fixed some deprecation warnings (#2607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed some deprecation warnings Signed-off-by: Matej Vašek * fixup: update deps Signed-off-by: Matej Vašek --------- Signed-off-by: Matej Vašek --- go.mod | 3 +- go.sum | 2 - pkg/docker/platform.go | 2 +- pkg/docker/pusher_test.go | 2 +- .../zz_close_guarding_client_generated.go | 40 +++++++++---------- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index afd751a6a5..c6d8083570 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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 diff --git a/go.sum b/go.sum index 3521f81195..28a4097c92 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/pkg/docker/platform.go b/pkg/docker/platform.go index e97ff355cb..460ced2354 100644 --- a/pkg/docker/platform.go +++ b/pkg/docker/platform.go @@ -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" diff --git a/pkg/docker/pusher_test.go b/pkg/docker/pusher_test.go index 7be54d90d7..82410f288f 100644 --- a/pkg/docker/pusher_test.go +++ b/pkg/docker/pusher_test.go @@ -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") } diff --git a/pkg/docker/zz_close_guarding_client_generated.go b/pkg/docker/zz_close_guarding_client_generated.go index b716bd15f9..e0db3737d3 100644 --- a/pkg/docker/zz_close_guarding_client_generated.go +++ b/pkg/docker/zz_close_guarding_client_generated.go @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 {