diff --git a/client/client.go b/client/client.go index b5b4dbe074..8894b46b0f 100644 --- a/client/client.go +++ b/client/client.go @@ -53,13 +53,13 @@ import ( snproxy "github.com/containerd/containerd/v2/core/snapshots/proxy" "github.com/containerd/containerd/v2/defaults" "github.com/containerd/containerd/v2/pkg/dialer" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services/introspection" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/containerd/typeurl/v2" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/client/container.go b/client/container.go index d989ee21b1..c6b79bb27a 100644 --- a/client/container.go +++ b/client/container.go @@ -31,9 +31,9 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/fifo" "github.com/containerd/typeurl/v2" ver "github.com/opencontainers/image-spec/specs-go" diff --git a/client/container_opts.go b/client/container_opts.go index 3983e6ea69..cf0e69c99c 100644 --- a/client/container_opts.go +++ b/client/container_opts.go @@ -26,10 +26,10 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "github.com/opencontainers/image-spec/identity" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/client/container_opts_unix.go b/client/container_opts_unix.go index 275d616184..2e8554190d 100644 --- a/client/container_opts_unix.go +++ b/client/container_opts_unix.go @@ -27,7 +27,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/image-spec/identity" ) diff --git a/client/containerstore.go b/client/containerstore.go index b7cdb55951..694e420397 100644 --- a/client/containerstore.go +++ b/client/containerstore.go @@ -23,9 +23,9 @@ import ( containersapi "github.com/containerd/containerd/v2/api/services/containers/v1" "github.com/containerd/containerd/v2/core/containers" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/client/events.go b/client/events.go index 8ba213969e..9f261d9f81 100644 --- a/client/events.go +++ b/client/events.go @@ -20,9 +20,9 @@ import ( "context" eventsapi "github.com/containerd/containerd/v2/api/services/events/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/client/image.go b/client/image.go index f0eef70acd..355bcba73e 100644 --- a/client/image.go +++ b/client/image.go @@ -29,9 +29,9 @@ import ( "github.com/containerd/containerd/v2/core/images/usage" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/internal/kmutex" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/rootfs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/opencontainers/go-digest" "github.com/opencontainers/image-spec/identity" diff --git a/client/image_store.go b/client/image_store.go index 747b53db0e..85f94b937a 100644 --- a/client/image_store.go +++ b/client/image_store.go @@ -22,10 +22,10 @@ import ( imagesapi "github.com/containerd/containerd/v2/api/services/images/v1" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/client/import.go b/client/import.go index 847d27c408..65ae95e22d 100644 --- a/client/import.go +++ b/client/import.go @@ -22,7 +22,7 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/images/archive" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/client/namespaces.go b/client/namespaces.go index 31bf9068b1..0512291a2e 100644 --- a/client/namespaces.go +++ b/client/namespaces.go @@ -21,9 +21,9 @@ import ( "strings" api "github.com/containerd/containerd/v2/api/services/namespaces/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) // NewNamespaceStoreFromClient returns a new namespace store diff --git a/client/process.go b/client/process.go index f340465d12..fbb09a0298 100644 --- a/client/process.go +++ b/client/process.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/containerd/v2/api/services/tasks/v1" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" ) // Process represents a system process diff --git a/client/pull.go b/client/pull.go index 9b81786942..d7d79c8cf5 100644 --- a/client/pull.go +++ b/client/pull.go @@ -28,9 +28,9 @@ import ( "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/core/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/tracing" "github.com/containerd/containerd/v2/pkg/unpack" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ) diff --git a/client/sandbox.go b/client/sandbox.go index e79ba08ca6..237c2c82a9 100644 --- a/client/sandbox.go +++ b/client/sandbox.go @@ -24,9 +24,9 @@ import ( "github.com/containerd/containerd/v2/core/containers" api "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/client/task.go b/client/task.go index 968acc793a..4838530976 100644 --- a/client/task.go +++ b/client/task.go @@ -34,12 +34,12 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/pkg/rootfs" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" google_protobuf "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" digest "github.com/opencontainers/go-digest" is "github.com/opencontainers/image-spec/specs-go" diff --git a/client/task_opts.go b/client/task_opts.go index 65868a52aa..ea6658192a 100644 --- a/client/task_opts.go +++ b/client/task_opts.go @@ -26,7 +26,7 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/client/transfer.go b/client/transfer.go index 64e06fe9bb..af240487a9 100644 --- a/client/transfer.go +++ b/client/transfer.go @@ -23,11 +23,11 @@ import ( streamingapi "github.com/containerd/containerd/v2/api/services/streaming/v1" transferapi "github.com/containerd/containerd/v2/api/services/transfer/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/transfer/proxy" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/cmd/containerd-shim-runc-v2/manager/manager_linux.go b/cmd/containerd-shim-runc-v2/manager/manager_linux.go index a5ea7c3e10..cc3b53e5b2 100644 --- a/cmd/containerd-shim-runc-v2/manager/manager_linux.go +++ b/cmd/containerd-shim-runc-v2/manager/manager_linux.go @@ -39,12 +39,12 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/core/runtime/v2/shim" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/pkg/schedcore" "github.com/containerd/containerd/v2/protobuf" "github.com/containerd/containerd/v2/version" + "github.com/containerd/errdefs" runcC "github.com/containerd/go-runc" "github.com/containerd/log" "github.com/opencontainers/runtime-spec/specs-go/features" diff --git a/cmd/containerd-shim-runc-v2/process/deleted_state.go b/cmd/containerd-shim-runc-v2/process/deleted_state.go index a2a2c2afd5..2314732672 100644 --- a/cmd/containerd-shim-runc-v2/process/deleted_state.go +++ b/cmd/containerd-shim-runc-v2/process/deleted_state.go @@ -24,8 +24,8 @@ import ( "fmt" "github.com/containerd/console" - "github.com/containerd/containerd/v2/pkg/errdefs" google_protobuf "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) type deletedState struct { diff --git a/cmd/containerd-shim-runc-v2/process/exec.go b/cmd/containerd-shim-runc-v2/process/exec.go index a38e218297..40344c13d8 100644 --- a/cmd/containerd-shim-runc-v2/process/exec.go +++ b/cmd/containerd-shim-runc-v2/process/exec.go @@ -31,8 +31,8 @@ import ( "golang.org/x/sys/unix" "github.com/containerd/console" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/stdio" + "github.com/containerd/errdefs" "github.com/containerd/fifo" runc "github.com/containerd/go-runc" specs "github.com/opencontainers/runtime-spec/specs-go" diff --git a/cmd/containerd-shim-runc-v2/process/utils.go b/cmd/containerd-shim-runc-v2/process/utils.go index 86df22081f..5a1c2ffafb 100644 --- a/cmd/containerd-shim-runc-v2/process/utils.go +++ b/cmd/containerd-shim-runc-v2/process/utils.go @@ -30,7 +30,7 @@ import ( "sync" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" runc "github.com/containerd/go-runc" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" diff --git a/cmd/containerd-shim-runc-v2/runc/container.go b/cmd/containerd-shim-runc-v2/runc/container.go index 615c70df03..a9febb4506 100644 --- a/cmd/containerd-shim-runc-v2/runc/container.go +++ b/cmd/containerd-shim-runc-v2/runc/container.go @@ -34,9 +34,9 @@ import ( "github.com/containerd/containerd/v2/cmd/containerd-shim-runc-v2/process" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/stdio" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" ) diff --git a/cmd/containerd-shim-runc-v2/task/service.go b/cmd/containerd-shim-runc-v2/task/service.go index 692c896a6d..782212e603 100644 --- a/cmd/containerd-shim-runc-v2/task/service.go +++ b/cmd/containerd-shim-runc-v2/task/service.go @@ -35,7 +35,6 @@ import ( "github.com/containerd/containerd/v2/core/runtime" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/core/runtime/v2/shim" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/oom" oomv1 "github.com/containerd/containerd/v2/pkg/oom/v1" @@ -46,6 +45,7 @@ import ( "github.com/containerd/containerd/v2/pkg/userns" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" runcC "github.com/containerd/go-runc" "github.com/containerd/log" "github.com/containerd/ttrpc" diff --git a/cmd/containerd/command/main.go b/cmd/containerd/command/main.go index 70f9ae8572..c11057e1b1 100644 --- a/cmd/containerd/command/main.go +++ b/cmd/containerd/command/main.go @@ -32,9 +32,9 @@ import ( _ "github.com/containerd/containerd/v2/core/metrics" // import containerd build info "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/defaults" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/sys" "github.com/containerd/containerd/v2/version" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/urfave/cli" "google.golang.org/grpc/grpclog" diff --git a/cmd/containerd/command/publish.go b/cmd/containerd/command/publish.go index 8206189562..4afce093d3 100644 --- a/cmd/containerd/command/publish.go +++ b/cmd/containerd/command/publish.go @@ -26,10 +26,10 @@ import ( eventsapi "github.com/containerd/containerd/v2/api/services/events/v1" "github.com/containerd/containerd/v2/pkg/dialer" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf/proto" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/urfave/cli" "google.golang.org/grpc" "google.golang.org/grpc/backoff" diff --git a/cmd/containerd/command/service_windows.go b/cmd/containerd/command/service_windows.go index 497736d0b3..f31bef1e76 100644 --- a/cmd/containerd/command/service_windows.go +++ b/cmd/containerd/command/service_windows.go @@ -25,7 +25,7 @@ import ( "time" "github.com/containerd/containerd/v2/cmd/containerd/server" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/sirupsen/logrus" "github.com/urfave/cli" "golang.org/x/sys/windows" diff --git a/cmd/containerd/server/config/config.go b/cmd/containerd/server/config/config.go index ac0a6e8a5e..87eb321a41 100644 --- a/cmd/containerd/server/config/config.go +++ b/cmd/containerd/server/config/config.go @@ -36,7 +36,7 @@ import ( "dario.cat/mergo" "github.com/pelletier/go-toml/v2" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" ) diff --git a/cmd/ctr/commands/containers/checkpoint.go b/cmd/ctr/commands/containers/checkpoint.go index a5ad36ffb5..4fef5c2914 100644 --- a/cmd/ctr/commands/containers/checkpoint.go +++ b/cmd/ctr/commands/containers/checkpoint.go @@ -22,7 +22,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/cmd/ctr/commands" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/urfave/cli" ) diff --git a/cmd/ctr/commands/containers/containers.go b/cmd/ctr/commands/containers/containers.go index a268747639..86c6699fb3 100644 --- a/cmd/ctr/commands/containers/containers.go +++ b/cmd/ctr/commands/containers/containers.go @@ -28,7 +28,7 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands/run" "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" "github.com/urfave/cli" diff --git a/cmd/ctr/commands/containers/restore.go b/cmd/ctr/commands/containers/restore.go index 720885f252..cdc5d26d83 100644 --- a/cmd/ctr/commands/containers/restore.go +++ b/cmd/ctr/commands/containers/restore.go @@ -24,7 +24,7 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/cmd/ctr/commands/tasks" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/urfave/cli" ) diff --git a/cmd/ctr/commands/content/content.go b/cmd/ctr/commands/content/content.go index 33dbf4a8cb..e19bc701fc 100644 --- a/cmd/ctr/commands/content/content.go +++ b/cmd/ctr/commands/content/content.go @@ -30,7 +30,7 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" units "github.com/docker/go-units" digest "github.com/opencontainers/go-digest" diff --git a/cmd/ctr/commands/content/fetch.go b/cmd/ctr/commands/content/fetch.go index da6c70f5a7..4cf3cf5292 100644 --- a/cmd/ctr/commands/content/fetch.go +++ b/cmd/ctr/commands/content/fetch.go @@ -31,8 +31,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/progress" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/opencontainers/go-digest" diff --git a/cmd/ctr/commands/images/images.go b/cmd/ctr/commands/images/images.go index a58b4f028b..3e0e053088 100644 --- a/cmd/ctr/commands/images/images.go +++ b/cmd/ctr/commands/images/images.go @@ -26,8 +26,8 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/progress" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/urfave/cli" diff --git a/cmd/ctr/commands/images/mount.go b/cmd/ctr/commands/images/mount.go index 32be49cb6b..6050b2c086 100644 --- a/cmd/ctr/commands/images/mount.go +++ b/cmd/ctr/commands/images/mount.go @@ -25,7 +25,7 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/defaults" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/opencontainers/image-spec/identity" "github.com/urfave/cli" diff --git a/cmd/ctr/commands/images/tag.go b/cmd/ctr/commands/images/tag.go index c65daa365b..c01833988e 100644 --- a/cmd/ctr/commands/images/tag.go +++ b/cmd/ctr/commands/images/tag.go @@ -22,8 +22,8 @@ import ( "github.com/urfave/cli" "github.com/containerd/containerd/v2/cmd/ctr/commands" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/transfer/image" + "github.com/containerd/errdefs" "github.com/distribution/reference" ) diff --git a/cmd/ctr/commands/images/unmount.go b/cmd/ctr/commands/images/unmount.go index 2f7ad06fbf..a0a7d0d8ad 100644 --- a/cmd/ctr/commands/images/unmount.go +++ b/cmd/ctr/commands/images/unmount.go @@ -22,7 +22,7 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/urfave/cli" ) diff --git a/cmd/ctr/commands/namespaces/namespaces.go b/cmd/ctr/commands/namespaces/namespaces.go index 49f2d9ae32..e0de1867c1 100644 --- a/cmd/ctr/commands/namespaces/namespaces.go +++ b/cmd/ctr/commands/namespaces/namespaces.go @@ -25,7 +25,7 @@ import ( "text/tabwriter" "github.com/containerd/containerd/v2/cmd/ctr/commands" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/urfave/cli" ) diff --git a/cmd/ctr/commands/run/run.go b/cmd/ctr/commands/run/run.go index 9df7f5a886..89516fb7a2 100644 --- a/cmd/ctr/commands/run/run.go +++ b/cmd/ctr/commands/run/run.go @@ -33,9 +33,9 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands/tasks" "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" clabels "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/cmd/ctr/commands/signals.go b/cmd/ctr/commands/signals.go index 2e1077a1ca..e78b6f7181 100644 --- a/cmd/ctr/commands/signals.go +++ b/cmd/ctr/commands/signals.go @@ -23,7 +23,7 @@ import ( "syscall" containerd "github.com/containerd/containerd/v2/client" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/cmd/ctr/commands/tasks/start.go b/cmd/ctr/commands/tasks/start.go index 87074b400d..81149c5b6d 100644 --- a/cmd/ctr/commands/tasks/start.go +++ b/cmd/ctr/commands/tasks/start.go @@ -23,7 +23,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/urfave/cli" ) diff --git a/contrib/diffservice/service.go b/contrib/diffservice/service.go index f6164c696f..22cd4de7d8 100644 --- a/contrib/diffservice/service.go +++ b/contrib/diffservice/service.go @@ -22,8 +22,8 @@ import ( diffapi "github.com/containerd/containerd/v2/api/services/diff/v1" "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/contrib/snapshotservice/service.go b/contrib/snapshotservice/service.go index 0f2286c089..3e765672a8 100644 --- a/contrib/snapshotservice/service.go +++ b/contrib/snapshotservice/service.go @@ -22,8 +22,8 @@ import ( snapshotsapi "github.com/containerd/containerd/v2/api/services/snapshots/v1" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) var empty = &ptypes.Empty{} diff --git a/core/content/helpers.go b/core/content/helpers.go index 514127d0aa..424db0fd8f 100644 --- a/core/content/helpers.go +++ b/core/content/helpers.go @@ -25,7 +25,7 @@ import ( "time" "github.com/containerd/containerd/v2/internal/randutil" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/content/helpers_test.go b/core/content/helpers_test.go index d3b11d6eb8..8601dc7b04 100644 --- a/core/content/helpers_test.go +++ b/core/content/helpers_test.go @@ -25,7 +25,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/go-digest" "github.com/stretchr/testify/assert" ) diff --git a/core/content/proxy/content_store.go b/core/content/proxy/content_store.go index d5e230b410..5d7edb770d 100644 --- a/core/content/proxy/content_store.go +++ b/core/content/proxy/content_store.go @@ -22,9 +22,9 @@ import ( contentapi "github.com/containerd/containerd/v2/api/services/content/v1" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" protobuftypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/core/content/proxy/content_writer.go b/core/content/proxy/content_writer.go index 60d9deee31..1b32e0aae5 100644 --- a/core/content/proxy/content_writer.go +++ b/core/content/proxy/content_writer.go @@ -23,8 +23,8 @@ import ( contentapi "github.com/containerd/containerd/v2/api/services/content/v1" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" ) diff --git a/core/content/testsuite/testsuite.go b/core/content/testsuite/testsuite.go index c93a62c770..1dd2d816e5 100644 --- a/core/content/testsuite/testsuite.go +++ b/core/content/testsuite/testsuite.go @@ -30,7 +30,7 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/internal/testutil" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log/logtest" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/diff/apply/apply_linux.go b/core/diff/apply/apply_linux.go index 309cbf7f34..c43b071b47 100644 --- a/core/diff/apply/apply_linux.go +++ b/core/diff/apply/apply_linux.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/pkg/archive" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/userns" + "github.com/containerd/errdefs" "golang.org/x/sys/unix" ) diff --git a/core/diff/proxy/differ.go b/core/diff/proxy/differ.go index 1eb438c7b1..ec0d0e8532 100644 --- a/core/diff/proxy/differ.go +++ b/core/diff/proxy/differ.go @@ -23,10 +23,10 @@ import ( "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/core/images/archive/exporter.go b/core/images/archive/exporter.go index bd136a4b8e..1377336a9a 100644 --- a/core/images/archive/exporter.go +++ b/core/images/archive/exporter.go @@ -28,8 +28,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" digest "github.com/opencontainers/go-digest" diff --git a/core/images/archive/importer.go b/core/images/archive/importer.go index 314c22ab82..83030bea50 100644 --- a/core/images/archive/importer.go +++ b/core/images/archive/importer.go @@ -30,8 +30,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/pkg/archive/compression" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" digest "github.com/opencontainers/go-digest" diff --git a/core/images/converter/uncompress/uncompress.go b/core/images/converter/uncompress/uncompress.go index c57d275adf..f5d5acba36 100644 --- a/core/images/converter/uncompress/uncompress.go +++ b/core/images/converter/uncompress/uncompress.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/images/converter" "github.com/containerd/containerd/v2/pkg/archive/compression" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/core/images/handlers.go b/core/images/handlers.go index 407030ab3c..0487fdebda 100644 --- a/core/images/handlers.go +++ b/core/images/handlers.go @@ -23,7 +23,7 @@ import ( "sort" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "golang.org/x/sync/errgroup" diff --git a/core/images/image.go b/core/images/image.go index 16bc9f74ed..f9b3e38d9f 100644 --- a/core/images/image.go +++ b/core/images/image.go @@ -24,7 +24,7 @@ import ( "time" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" digest "github.com/opencontainers/go-digest" diff --git a/core/images/mediatypes.go b/core/images/mediatypes.go index 19976a2390..cd51aa5ebb 100644 --- a/core/images/mediatypes.go +++ b/core/images/mediatypes.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/core/images/usage/calculator.go b/core/images/usage/calculator.go index 738a459b88..35477ba1a6 100644 --- a/core/images/usage/calculator.go +++ b/core/images/usage/calculator.go @@ -24,7 +24,7 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/leases/proxy/manager.go b/core/leases/proxy/manager.go index bea57930b2..d51b2b20b3 100644 --- a/core/leases/proxy/manager.go +++ b/core/leases/proxy/manager.go @@ -21,8 +21,8 @@ import ( leasesapi "github.com/containerd/containerd/v2/api/services/leases/v1" "github.com/containerd/containerd/v2/core/leases" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" ) type proxyManager struct { diff --git a/core/metadata/containers.go b/core/metadata/containers.go index 4aebf18f5a..9973c9b9fe 100644 --- a/core/metadata/containers.go +++ b/core/metadata/containers.go @@ -25,13 +25,13 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/metadata/boltutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf/proto" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" bolt "go.etcd.io/bbolt" ) diff --git a/core/metadata/containers_test.go b/core/metadata/containers_test.go index 4ca9746301..e3110c9163 100644 --- a/core/metadata/containers_test.go +++ b/core/metadata/containers_test.go @@ -26,11 +26,11 @@ import ( "time" "github.com/containerd/containerd/v2/core/containers" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log/logtest" "github.com/containerd/typeurl/v2" "github.com/google/go-cmp/cmp" diff --git a/core/metadata/content.go b/core/metadata/content.go index 68b88fc551..3c990cb1e8 100644 --- a/core/metadata/content.go +++ b/core/metadata/content.go @@ -27,10 +27,10 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/metadata/boltutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/metadata/content_test.go b/core/metadata/content_test.go index f9b3df14a5..62f5d5506d 100644 --- a/core/metadata/content_test.go +++ b/core/metadata/content_test.go @@ -28,10 +28,10 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/content/testsuite" "github.com/containerd/containerd/v2/core/leases" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins/content/local" + "github.com/containerd/errdefs" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" bolt "go.etcd.io/bbolt" diff --git a/core/metadata/db_test.go b/core/metadata/db_test.go index cf66619ee7..10dfe562da 100644 --- a/core/metadata/db_test.go +++ b/core/metadata/db_test.go @@ -34,12 +34,12 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/gc" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins/content/local" "github.com/containerd/containerd/v2/plugins/snapshots/native" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log/logtest" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/metadata/images.go b/core/metadata/images.go index 7b34cfad33..8da3c6ed46 100644 --- a/core/metadata/images.go +++ b/core/metadata/images.go @@ -28,10 +28,10 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/metadata/boltutil" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" bolt "go.etcd.io/bbolt" diff --git a/core/metadata/images_test.go b/core/metadata/images_test.go index e4a574c0e9..50e8a8b2ac 100644 --- a/core/metadata/images_test.go +++ b/core/metadata/images_test.go @@ -24,8 +24,8 @@ import ( "time" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" + "github.com/containerd/errdefs" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/core/metadata/leases.go b/core/metadata/leases.go index d20b5f3095..649d77bc50 100644 --- a/core/metadata/leases.go +++ b/core/metadata/leases.go @@ -26,9 +26,9 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/metadata/boltutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" bolt "go.etcd.io/bbolt" ) diff --git a/core/metadata/leases_test.go b/core/metadata/leases_test.go index 2cc19871da..f95c4a4ed7 100644 --- a/core/metadata/leases_test.go +++ b/core/metadata/leases_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/containerd/containerd/v2/core/leases" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/core/metadata/namespaces.go b/core/metadata/namespaces.go index 5b67f09b4b..b3c56e6293 100644 --- a/core/metadata/namespaces.go +++ b/core/metadata/namespaces.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/identifiers" l "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/core/metadata/sandbox.go b/core/metadata/sandbox.go index 53b5163967..98a283a70c 100644 --- a/core/metadata/sandbox.go +++ b/core/metadata/sandbox.go @@ -25,10 +25,10 @@ import ( "github.com/containerd/containerd/v2/core/metadata/boltutil" api "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "go.etcd.io/bbolt" ) diff --git a/core/metadata/sandbox_test.go b/core/metadata/sandbox_test.go index 898726f768..1cef52819e 100644 --- a/core/metadata/sandbox_test.go +++ b/core/metadata/sandbox_test.go @@ -20,8 +20,8 @@ import ( "testing" api "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "github.com/google/go-cmp/cmp" ) diff --git a/core/metadata/snapshot.go b/core/metadata/snapshot.go index b264b84b7e..af4234baaf 100644 --- a/core/metadata/snapshot.go +++ b/core/metadata/snapshot.go @@ -28,10 +28,10 @@ import ( "github.com/containerd/containerd/v2/core/metadata/boltutil" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" bolt "go.etcd.io/bbolt" ) diff --git a/core/metadata/snapshot_test.go b/core/metadata/snapshot_test.go index 261dc35ed4..0f9028c83f 100644 --- a/core/metadata/snapshot_test.go +++ b/core/metadata/snapshot_test.go @@ -31,10 +31,10 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/testsuite" "github.com/containerd/containerd/v2/internal/testutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins/snapshots/native" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/core/metrics/cgroups/v1/cgroups.go b/core/metrics/cgroups/v1/cgroups.go index 657a9ac2f9..09622c84c5 100644 --- a/core/metrics/cgroups/v1/cgroups.go +++ b/core/metrics/cgroups/v1/cgroups.go @@ -24,9 +24,9 @@ import ( cgroups "github.com/containerd/cgroups/v3/cgroup1" eventstypes "github.com/containerd/containerd/v2/api/events" "github.com/containerd/containerd/v2/core/runtime" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/go-metrics" ) diff --git a/core/remotes/docker/authorizer.go b/core/remotes/docker/authorizer.go index 75fcb8bc31..e9af2f76be 100644 --- a/core/remotes/docker/authorizer.go +++ b/core/remotes/docker/authorizer.go @@ -27,7 +27,7 @@ import ( "github.com/containerd/containerd/v2/core/remotes/docker/auth" remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/core/remotes/docker/config/hosts.go b/core/remotes/docker/config/hosts.go index cb4a25fbb6..e6cba87603 100644 --- a/core/remotes/docker/config/hosts.go +++ b/core/remotes/docker/config/hosts.go @@ -31,7 +31,7 @@ import ( "time" "github.com/containerd/containerd/v2/core/remotes/docker" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/pelletier/go-toml/v2" tomlu "github.com/pelletier/go-toml/v2/unstable" diff --git a/core/remotes/docker/fetcher.go b/core/remotes/docker/fetcher.go index 1f1eb24964..2c7d880a9d 100644 --- a/core/remotes/docker/fetcher.go +++ b/core/remotes/docker/fetcher.go @@ -30,7 +30,7 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/klauspost/compress/zstd" digest "github.com/opencontainers/go-digest" diff --git a/core/remotes/docker/httpreadseeker.go b/core/remotes/docker/httpreadseeker.go index 6dfa40238f..6739e7904e 100644 --- a/core/remotes/docker/httpreadseeker.go +++ b/core/remotes/docker/httpreadseeker.go @@ -21,7 +21,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/core/remotes/docker/pusher.go b/core/remotes/docker/pusher.go index ec93dddb53..c3d0c6069c 100644 --- a/core/remotes/docker/pusher.go +++ b/core/remotes/docker/pusher.go @@ -32,7 +32,7 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes" remoteserrors "github.com/containerd/containerd/v2/core/remotes/errors" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/remotes/docker/pusher_test.go b/core/remotes/docker/pusher_test.go index 22de402f9b..8db32922c3 100644 --- a/core/remotes/docker/pusher_test.go +++ b/core/remotes/docker/pusher_test.go @@ -31,8 +31,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/reference" + "github.com/containerd/errdefs" "github.com/containerd/log/logtest" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/remotes/docker/resolver.go b/core/remotes/docker/resolver.go index 177c47e4ac..962faf39a6 100644 --- a/core/remotes/docker/resolver.go +++ b/core/remotes/docker/resolver.go @@ -32,10 +32,10 @@ import ( "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/core/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/reference" "github.com/containerd/containerd/v2/pkg/tracing" "github.com/containerd/containerd/v2/version" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/remotes/docker/resolver_test.go b/core/remotes/docker/resolver_test.go index 1f57609a5b..4800112cf2 100644 --- a/core/remotes/docker/resolver_test.go +++ b/core/remotes/docker/resolver_test.go @@ -35,7 +35,7 @@ import ( "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/core/remotes/docker/auth" remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/remotes/docker/schema1/converter.go b/core/remotes/docker/schema1/converter.go index f8876b1856..e8a3534ddd 100644 --- a/core/remotes/docker/schema1/converter.go +++ b/core/remotes/docker/schema1/converter.go @@ -36,8 +36,8 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/pkg/archive/compression" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go" diff --git a/core/remotes/docker/status.go b/core/remotes/docker/status.go index 1e02cfd2c2..9835525ab5 100644 --- a/core/remotes/docker/status.go +++ b/core/remotes/docker/status.go @@ -21,7 +21,7 @@ import ( "sync" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/moby/locker" ) diff --git a/core/remotes/handlers.go b/core/remotes/handlers.go index 8e9cbebcc4..16fcdbf84d 100644 --- a/core/remotes/handlers.go +++ b/core/remotes/handlers.go @@ -27,8 +27,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/core/runtime/nsmap.go b/core/runtime/nsmap.go index d459f34b13..fec82113e3 100644 --- a/core/runtime/nsmap.go +++ b/core/runtime/nsmap.go @@ -21,8 +21,8 @@ import ( "fmt" "sync" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" ) type object interface { diff --git a/core/runtime/v2/example/example.go b/core/runtime/v2/example/example.go index 43c712f50a..d0933584e8 100644 --- a/core/runtime/v2/example/example.go +++ b/core/runtime/v2/example/example.go @@ -24,10 +24,10 @@ import ( taskAPI "github.com/containerd/containerd/v2/api/runtime/task/v2" apitypes "github.com/containerd/containerd/v2/api/types" "github.com/containerd/containerd/v2/core/runtime/v2/shim" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/shutdown" "github.com/containerd/containerd/v2/plugins" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "github.com/containerd/ttrpc" diff --git a/core/runtime/v2/manager.go b/core/runtime/v2/manager.go index ea60108641..62c3b535b8 100644 --- a/core/runtime/v2/manager.go +++ b/core/runtime/v2/manager.go @@ -34,13 +34,13 @@ import ( shimbinary "github.com/containerd/containerd/v2/core/runtime/v2/shim" "github.com/containerd/containerd/v2/core/sandbox" "github.com/containerd/containerd/v2/internal/cleanup" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events/exchange" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/timeout" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" "github.com/containerd/containerd/v2/protobuf/proto" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/core/runtime/v2/process.go b/core/runtime/v2/process.go index 674c4987aa..5b638bd0c2 100644 --- a/core/runtime/v2/process.go +++ b/core/runtime/v2/process.go @@ -23,8 +23,8 @@ import ( task "github.com/containerd/containerd/v2/api/runtime/task/v3" tasktypes "github.com/containerd/containerd/v2/api/types/task" "github.com/containerd/containerd/v2/core/runtime" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/ttrpc" ) diff --git a/core/runtime/v2/shim.go b/core/runtime/v2/shim.go index 47ecfdc74f..6d7bed38a0 100644 --- a/core/runtime/v2/shim.go +++ b/core/runtime/v2/shim.go @@ -40,12 +40,12 @@ import ( "github.com/containerd/containerd/v2/api/types" "github.com/containerd/containerd/v2/core/runtime" client "github.com/containerd/containerd/v2/core/runtime/v2/shim" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events/exchange" "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/containerd/v2/pkg/timeout" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/core/runtime/v2/shim/shim_windows.go b/core/runtime/v2/shim/shim_windows.go index 2af26556a1..8181b4c815 100644 --- a/core/runtime/v2/shim/shim_windows.go +++ b/core/runtime/v2/shim/shim_windows.go @@ -22,7 +22,7 @@ import ( "net" "os" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/ttrpc" "github.com/sirupsen/logrus" ) diff --git a/core/runtime/v2/shim/util.go b/core/runtime/v2/shim/util.go index 7b8d601a45..cfcf073878 100644 --- a/core/runtime/v2/shim/util.go +++ b/core/runtime/v2/shim/util.go @@ -33,10 +33,10 @@ import ( "github.com/containerd/typeurl/v2" "github.com/containerd/containerd/v2/pkg/atomicfile" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf/proto" "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) type CommandConfig struct { diff --git a/core/runtime/v2/shim_load.go b/core/runtime/v2/shim_load.go index 1d5b48fce4..12eff4f3ca 100644 --- a/core/runtime/v2/shim_load.go +++ b/core/runtime/v2/shim_load.go @@ -24,9 +24,9 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/internal/cleanup" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/timeout" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/core/runtime/v2/shim_test.go b/core/runtime/v2/shim_test.go index 69a31aea41..fe8a005d0a 100644 --- a/core/runtime/v2/shim_test.go +++ b/core/runtime/v2/shim_test.go @@ -23,7 +23,7 @@ import ( "testing" client "github.com/containerd/containerd/v2/core/runtime/v2/shim" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/stretchr/testify/require" ) diff --git a/core/sandbox/proxy/controller.go b/core/sandbox/proxy/controller.go index 6992c4531c..a4e5fddf16 100644 --- a/core/sandbox/proxy/controller.go +++ b/core/sandbox/proxy/controller.go @@ -23,7 +23,7 @@ import ( "github.com/containerd/containerd/v2/api/types" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "google.golang.org/protobuf/types/known/anypb" ) diff --git a/core/sandbox/proxy/store.go b/core/sandbox/proxy/store.go index 8fc153edf4..6fd60065c4 100644 --- a/core/sandbox/proxy/store.go +++ b/core/sandbox/proxy/store.go @@ -21,7 +21,7 @@ import ( api "github.com/containerd/containerd/v2/api/services/sandbox/v1" sb "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // remoteSandboxStore is a low-level containerd client to manage sandbox environments metadata diff --git a/core/sandbox/store.go b/core/sandbox/store.go index 95167703ca..705e86faca 100644 --- a/core/sandbox/store.go +++ b/core/sandbox/store.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/core/snapshots/proxy/proxy.go b/core/snapshots/proxy/proxy.go index d3522da3d4..92f277abda 100644 --- a/core/snapshots/proxy/proxy.go +++ b/core/snapshots/proxy/proxy.go @@ -23,8 +23,8 @@ import ( snapshotsapi "github.com/containerd/containerd/v2/api/services/snapshots/v1" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" protobuftypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) // NewSnapshotter returns a new Snapshotter which communicates over a GRPC diff --git a/core/snapshots/storage/bolt.go b/core/snapshots/storage/bolt.go index e1add50b8c..728fb0df7c 100644 --- a/core/snapshots/storage/bolt.go +++ b/core/snapshots/storage/bolt.go @@ -27,8 +27,8 @@ import ( "github.com/containerd/containerd/v2/core/metadata/boltutil" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/core/snapshots/storage/metastore_test.go b/core/snapshots/storage/metastore_test.go index d72bd3d9eb..11395a6853 100644 --- a/core/snapshots/storage/metastore_test.go +++ b/core/snapshots/storage/metastore_test.go @@ -24,7 +24,7 @@ import ( "time" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" ) diff --git a/core/snapshots/testsuite/testsuite.go b/core/snapshots/testsuite/testsuite.go index 1495a0a6fa..a3d269fd1a 100644 --- a/core/snapshots/testsuite/testsuite.go +++ b/core/snapshots/testsuite/testsuite.go @@ -32,9 +32,9 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/internal/randutil" "github.com/containerd/containerd/v2/internal/testutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/continuity/fs/fstest" + "github.com/containerd/errdefs" "github.com/containerd/log/logtest" "github.com/stretchr/testify/assert" ) diff --git a/go.mod b/go.mod index 31311757db..7d6fec5efb 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/containerd/cgroups/v3 v3.0.3 github.com/containerd/console v1.0.3 github.com/containerd/continuity v0.4.3 + github.com/containerd/errdefs v0.1.0 github.com/containerd/fifo v1.1.0 github.com/containerd/go-cni v1.1.9 github.com/containerd/go-runc v1.1.0 diff --git a/go.sum b/go.sum index 3df5480562..9f0f799032 100644 --- a/go.sum +++ b/go.sum @@ -48,6 +48,8 @@ github.com/containerd/containerd v1.7.8 h1:RkwgOW3AVUT3H/dyT0W03Dc8AzlpMG65lX48K github.com/containerd/containerd v1.7.8/go.mod h1:L/Hn9qylJtUFT7cPeM0Sr3fATj+WjHwRQ0lyrYk3OPY= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= +github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU= diff --git a/integration/client/client_test.go b/integration/client/client_test.go index c363a6c18f..691d07c7af 100644 --- a/integration/client/client_test.go +++ b/integration/client/client_test.go @@ -40,8 +40,8 @@ import ( "github.com/containerd/containerd/v2/defaults" imagelist "github.com/containerd/containerd/v2/integration/images" "github.com/containerd/containerd/v2/internal/testutil" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" ) diff --git a/integration/client/container_linux_test.go b/integration/client/container_linux_test.go index e90a571be6..fb7d6427bb 100644 --- a/integration/client/container_linux_test.go +++ b/integration/client/container_linux_test.go @@ -38,10 +38,10 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/pkg/sys" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/require" diff --git a/integration/client/container_test.go b/integration/client/container_test.go index e5f5545191..ce831e062b 100644 --- a/integration/client/container_test.go +++ b/integration/client/container_test.go @@ -38,12 +38,12 @@ import ( _ "github.com/containerd/containerd/v2/core/runtime" "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/plugins" gogotypes "github.com/containerd/containerd/v2/protobuf/types" "github.com/containerd/continuity/fs" + "github.com/containerd/errdefs" "github.com/containerd/go-runc" "github.com/containerd/log/logtest" "github.com/containerd/platforms" diff --git a/integration/client/content_test.go b/integration/client/content_test.go index 38ce387c85..ce78ff72a6 100644 --- a/integration/client/content_test.go +++ b/integration/client/content_test.go @@ -25,8 +25,8 @@ import ( . "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/content/testsuite" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" ) func newContentStore(ctx context.Context, root string) (context.Context, content.Store, func() error, error) { diff --git a/integration/client/export_test.go b/integration/client/export_test.go index bf727f308d..8f964f6d4b 100644 --- a/integration/client/export_test.go +++ b/integration/client/export_test.go @@ -29,8 +29,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/images/archive" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/google/uuid" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/integration/client/image_test.go b/integration/client/image_test.go index 3d907e0bb0..ce7e105abf 100644 --- a/integration/client/image_test.go +++ b/integration/client/image_test.go @@ -27,8 +27,8 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/defaults" imagelist "github.com/containerd/containerd/v2/integration/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/integration/client/lease_test.go b/integration/client/lease_test.go index c6e6617401..4878433826 100644 --- a/integration/client/lease_test.go +++ b/integration/client/lease_test.go @@ -24,7 +24,7 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/leases" imagelist "github.com/containerd/containerd/v2/integration/images" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/image-spec/identity" ) diff --git a/integration/containerd_image_test.go b/integration/containerd_image_test.go index a80fca1fca..03955b51c9 100644 --- a/integration/containerd_image_test.go +++ b/integration/containerd_image_test.go @@ -28,8 +28,8 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/integration/images" "github.com/containerd/containerd/v2/pkg/cri/labels" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/bandwidth/fake_shaper.go b/pkg/cri/bandwidth/fake_shaper.go index 203ef877f6..58e4e1ab47 100644 --- a/pkg/cri/bandwidth/fake_shaper.go +++ b/pkg/cri/bandwidth/fake_shaper.go @@ -33,7 +33,7 @@ limitations under the License. package bandwidth import ( - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "k8s.io/apimachinery/pkg/api/resource" ) diff --git a/pkg/cri/bandwidth/unsupported.go b/pkg/cri/bandwidth/unsupported.go index a09a693305..29e9765f62 100644 --- a/pkg/cri/bandwidth/unsupported.go +++ b/pkg/cri/bandwidth/unsupported.go @@ -35,7 +35,7 @@ limitations under the License. package bandwidth import ( - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "k8s.io/apimachinery/pkg/api/resource" ) diff --git a/pkg/cri/instrument/instrumented_service.go b/pkg/cri/instrument/instrumented_service.go index b51930d748..a030bc7f81 100644 --- a/pkg/cri/instrument/instrumented_service.go +++ b/pkg/cri/instrument/instrumented_service.go @@ -19,8 +19,8 @@ package instrument import ( "context" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/tracing" + "github.com/containerd/errdefs" "github.com/containerd/log" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/nri/nri_api_linux.go b/pkg/cri/nri/nri_api_linux.go index e6ed0a736a..e01aebe344 100644 --- a/pkg/cri/nri/nri_api_linux.go +++ b/pkg/cri/nri/nri_api_linux.go @@ -29,7 +29,7 @@ import ( cstore "github.com/containerd/containerd/v2/pkg/cri/store/container" sstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" runtimespec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/cri/opts/container.go b/pkg/cri/opts/container.go index 95e1441e08..ba37006f93 100644 --- a/pkg/cri/opts/container.go +++ b/pkg/cri/opts/container.go @@ -30,7 +30,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/cri/opts/spec_nonwindows.go b/pkg/cri/opts/spec_nonwindows.go index efa906c165..8798d024b8 100644 --- a/pkg/cri/opts/spec_nonwindows.go +++ b/pkg/cri/opts/spec_nonwindows.go @@ -22,8 +22,8 @@ import ( "context" "github.com/containerd/containerd/v2/core/containers" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" imagespec "github.com/opencontainers/image-spec/specs-go/v1" runtimespec "github.com/opencontainers/runtime-spec/specs-go" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/container_execsync.go b/pkg/cri/server/container_execsync.go index 3699d6bb14..53160e1d8d 100644 --- a/pkg/cri/server/container_execsync.go +++ b/pkg/cri/server/container_execsync.go @@ -26,8 +26,8 @@ import ( containerd "github.com/containerd/containerd/v2/client" containerdio "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/log" "k8s.io/client-go/tools/remotecommand" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/container_remove.go b/pkg/cri/server/container_remove.go index 4bcb18fe69..1bf53f8ba6 100644 --- a/pkg/cri/server/container_remove.go +++ b/pkg/cri/server/container_remove.go @@ -24,7 +24,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" ) diff --git a/pkg/cri/server/container_start.go b/pkg/cri/server/container_start.go index 836f17433c..2a80d683ba 100644 --- a/pkg/cri/server/container_start.go +++ b/pkg/cri/server/container_start.go @@ -25,7 +25,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" containerdio "github.com/containerd/containerd/v2/pkg/cio" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/container_stats_list.go b/pkg/cri/server/container_stats_list.go index 83c2d88222..363a51a082 100644 --- a/pkg/cri/server/container_stats_list.go +++ b/pkg/cri/server/container_stats_list.go @@ -34,8 +34,8 @@ import ( "github.com/containerd/containerd/v2/api/types" containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" "github.com/containerd/containerd/v2/pkg/cri/store/stats" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" ) // ListContainerStats returns stats of all running containers. diff --git a/pkg/cri/server/container_status.go b/pkg/cri/server/container_status.go index 9fa26c2758..7100e12e13 100644 --- a/pkg/cri/server/container_status.go +++ b/pkg/cri/server/container_status.go @@ -23,7 +23,7 @@ import ( containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" runtimespec "github.com/opencontainers/runtime-spec/specs-go" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/container_stop.go b/pkg/cri/server/container_stop.go index bdccb7e1a2..0c7047d72c 100644 --- a/pkg/cri/server/container_stop.go +++ b/pkg/cri/server/container_stop.go @@ -26,8 +26,8 @@ import ( eventtypes "github.com/containerd/containerd/v2/api/events" containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/moby/sys/signal" diff --git a/pkg/cri/server/container_update_resources.go b/pkg/cri/server/container_update_resources.go index 5db3be8ce8..605056d2b1 100644 --- a/pkg/cri/server/container_update_resources.go +++ b/pkg/cri/server/container_update_resources.go @@ -29,7 +29,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/core/containers" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" diff --git a/pkg/cri/server/events.go b/pkg/cri/server/events.go index d838908723..0b88da227d 100644 --- a/pkg/cri/server/events.go +++ b/pkg/cri/server/events.go @@ -36,9 +36,9 @@ import ( containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" ) const ( diff --git a/pkg/cri/server/helpers.go b/pkg/cri/server/helpers.go index 8fcae64c17..eb0a3e5583 100644 --- a/pkg/cri/server/helpers.go +++ b/pkg/cri/server/helpers.go @@ -36,8 +36,8 @@ import ( crilabels "github.com/containerd/containerd/v2/pkg/cri/labels" containerstore "github.com/containerd/containerd/v2/pkg/cri/store/container" imagestore "github.com/containerd/containerd/v2/pkg/cri/store/image" - "github.com/containerd/containerd/v2/pkg/errdefs" clabels "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/cri/server/images/image_pull.go b/pkg/cri/server/images/image_pull.go index 60389c8695..6355a161f7 100644 --- a/pkg/cri/server/images/image_pull.go +++ b/pkg/cri/server/images/image_pull.go @@ -47,9 +47,9 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/annotations" criconfig "github.com/containerd/containerd/v2/pkg/cri/config" crilabels "github.com/containerd/containerd/v2/pkg/cri/labels" - "github.com/containerd/containerd/v2/pkg/errdefs" snpkg "github.com/containerd/containerd/v2/pkg/snapshotters" "github.com/containerd/containerd/v2/pkg/tracing" + "github.com/containerd/errdefs" ) // For image management: diff --git a/pkg/cri/server/images/image_remove.go b/pkg/cri/server/images/image_remove.go index 7c5b7b8b75..33fd10f4e4 100644 --- a/pkg/cri/server/images/image_remove.go +++ b/pkg/cri/server/images/image_remove.go @@ -22,8 +22,8 @@ import ( eventstypes "github.com/containerd/containerd/v2/api/events" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/tracing" + "github.com/containerd/errdefs" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" ) diff --git a/pkg/cri/server/images/image_status.go b/pkg/cri/server/images/image_status.go index 3990c0e9a0..cc4f022dc1 100644 --- a/pkg/cri/server/images/image_status.go +++ b/pkg/cri/server/images/image_status.go @@ -25,8 +25,8 @@ import ( imagestore "github.com/containerd/containerd/v2/pkg/cri/store/image" "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/tracing" + "github.com/containerd/errdefs" "github.com/containerd/log" imagespec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/cri/server/images/service_test.go b/pkg/cri/server/images/service_test.go index 1779920512..0e9272e668 100644 --- a/pkg/cri/server/images/service_test.go +++ b/pkg/cri/server/images/service_test.go @@ -23,7 +23,7 @@ import ( criconfig "github.com/containerd/containerd/v2/pkg/cri/config" imagestore "github.com/containerd/containerd/v2/pkg/cri/store/image" snapshotstore "github.com/containerd/containerd/v2/pkg/cri/store/snapshot" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/stretchr/testify/assert" ) diff --git a/pkg/cri/server/images/snapshots.go b/pkg/cri/server/images/snapshots.go index 74af6bff45..d8c98d69ea 100644 --- a/pkg/cri/server/images/snapshots.go +++ b/pkg/cri/server/images/snapshots.go @@ -24,7 +24,7 @@ import ( snapshot "github.com/containerd/containerd/v2/core/snapshots" snapshotstore "github.com/containerd/containerd/v2/pkg/cri/store/snapshot" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/cri/server/podsandbox/controller.go b/pkg/cri/server/podsandbox/controller.go index 96a94f5b14..6ab0441128 100644 --- a/pkg/cri/server/podsandbox/controller.go +++ b/pkg/cri/server/podsandbox/controller.go @@ -35,11 +35,11 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/server/podsandbox/types" imagestore "github.com/containerd/containerd/v2/pkg/cri/store/image" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" osinterface "github.com/containerd/containerd/v2/pkg/os" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ) diff --git a/pkg/cri/server/podsandbox/recover.go b/pkg/cri/server/podsandbox/recover.go index 7eabef8d5a..6ae3214c22 100644 --- a/pkg/cri/server/podsandbox/recover.go +++ b/pkg/cri/server/podsandbox/recover.go @@ -30,8 +30,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/server/podsandbox/types" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/netns" + "github.com/containerd/errdefs" ) // loadContainerTimeout is the default timeout for loading a container/sandbox. diff --git a/pkg/cri/server/podsandbox/sandbox_delete.go b/pkg/cri/server/podsandbox/sandbox_delete.go index b408906448..7bdc1ccca9 100644 --- a/pkg/cri/server/podsandbox/sandbox_delete.go +++ b/pkg/cri/server/podsandbox/sandbox_delete.go @@ -22,7 +22,7 @@ import ( apitasks "github.com/containerd/containerd/v2/api/services/tasks/v1" containerd "github.com/containerd/containerd/v2/client" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/cri/server/podsandbox/sandbox_run.go b/pkg/cri/server/podsandbox/sandbox_run.go index 904a1d08be..c791ff7efd 100644 --- a/pkg/cri/server/podsandbox/sandbox_run.go +++ b/pkg/cri/server/podsandbox/sandbox_run.go @@ -40,7 +40,7 @@ import ( imagestore "github.com/containerd/containerd/v2/pkg/cri/store/image" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) func init() { diff --git a/pkg/cri/server/podsandbox/sandbox_stats.go b/pkg/cri/server/podsandbox/sandbox_stats.go index 5d7f7ed829..7c5141d0a1 100644 --- a/pkg/cri/server/podsandbox/sandbox_stats.go +++ b/pkg/cri/server/podsandbox/sandbox_stats.go @@ -20,7 +20,7 @@ import ( "context" "github.com/containerd/containerd/v2/api/types" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // TODO(dcantah): Implement metrics to be used for SandboxStats rpc. diff --git a/pkg/cri/server/podsandbox/sandbox_status.go b/pkg/cri/server/podsandbox/sandbox_status.go index 7439f6e3dc..d75b376f54 100644 --- a/pkg/cri/server/podsandbox/sandbox_status.go +++ b/pkg/cri/server/podsandbox/sandbox_status.go @@ -28,7 +28,7 @@ import ( "github.com/containerd/containerd/v2/core/sandbox" "github.com/containerd/containerd/v2/pkg/cri/server/base" "github.com/containerd/containerd/v2/pkg/cri/server/podsandbox/types" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) func (c *Controller) Status(ctx context.Context, sandboxID string, verbose bool) (sandbox.ControllerStatus, error) { diff --git a/pkg/cri/server/podsandbox/sandbox_stop.go b/pkg/cri/server/podsandbox/sandbox_stop.go index d3d564b2a6..d0c30580fd 100644 --- a/pkg/cri/server/podsandbox/sandbox_stop.go +++ b/pkg/cri/server/podsandbox/sandbox_stop.go @@ -30,8 +30,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/server/podsandbox/types" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" ) func (c *Controller) Stop(ctx context.Context, sandboxID string, _ ...sandbox.StopOpt) error { diff --git a/pkg/cri/server/restart.go b/pkg/cri/server/restart.go index acdb130255..a6353bc9c8 100644 --- a/pkg/cri/server/restart.go +++ b/pkg/cri/server/restart.go @@ -28,8 +28,8 @@ import ( criconfig "github.com/containerd/containerd/v2/pkg/cri/config" crilabels "github.com/containerd/containerd/v2/pkg/cri/labels" "github.com/containerd/containerd/v2/pkg/cri/server/podsandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/netns" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" "golang.org/x/sync/errgroup" diff --git a/pkg/cri/server/sandbox_portforward_other.go b/pkg/cri/server/sandbox_portforward_other.go index 78e72f443e..2c7fbc1b56 100644 --- a/pkg/cri/server/sandbox_portforward_other.go +++ b/pkg/cri/server/sandbox_portforward_other.go @@ -23,7 +23,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // portForward uses netns to enter the sandbox namespace, and forwards a stream inside the diff --git a/pkg/cri/server/sandbox_remove.go b/pkg/cri/server/sandbox_remove.go index 930026985c..ed3b1ae971 100644 --- a/pkg/cri/server/sandbox_remove.go +++ b/pkg/cri/server/sandbox_remove.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/sandbox_stats_linux.go b/pkg/cri/server/sandbox_stats_linux.go index 5cfe202301..a781db4a01 100644 --- a/pkg/cri/server/sandbox_stats_linux.go +++ b/pkg/cri/server/sandbox_stats_linux.go @@ -25,7 +25,7 @@ import ( "github.com/containerd/cgroups/v3/cgroup1" cgroupsv2 "github.com/containerd/cgroups/v3/cgroup2" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containernetworking/plugins/pkg/ns" "github.com/vishvananda/netlink" diff --git a/pkg/cri/server/sandbox_stats_list.go b/pkg/cri/server/sandbox_stats_list.go index 7222689c86..95381bbb79 100644 --- a/pkg/cri/server/sandbox_stats_list.go +++ b/pkg/cri/server/sandbox_stats_list.go @@ -22,7 +22,7 @@ import ( "fmt" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" ) diff --git a/pkg/cri/server/sandbox_stats_other.go b/pkg/cri/server/sandbox_stats_other.go index ab102553b2..585a478cac 100644 --- a/pkg/cri/server/sandbox_stats_other.go +++ b/pkg/cri/server/sandbox_stats_other.go @@ -23,7 +23,7 @@ import ( "fmt" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" ) diff --git a/pkg/cri/server/sandbox_stats_windows.go b/pkg/cri/server/sandbox_stats_windows.go index a7bbc6e9b2..6fb9773f96 100644 --- a/pkg/cri/server/sandbox_stats_windows.go +++ b/pkg/cri/server/sandbox_stats_windows.go @@ -30,8 +30,8 @@ import ( sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" "github.com/containerd/containerd/v2/pkg/cri/store/stats" ctrdutil "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/server/sandbox_status.go b/pkg/cri/server/sandbox_status.go index 48c6ccff58..1bbd539f52 100644 --- a/pkg/cri/server/sandbox_status.go +++ b/pkg/cri/server/sandbox_status.go @@ -26,7 +26,7 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/server/base" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // PodSandboxStatus returns the status of the PodSandbox. diff --git a/pkg/cri/server/sandbox_stop.go b/pkg/cri/server/sandbox_stop.go index e5b80ba72f..6879627265 100644 --- a/pkg/cri/server/sandbox_stop.go +++ b/pkg/cri/server/sandbox_stop.go @@ -26,7 +26,7 @@ import ( runtime "k8s.io/cri-api/pkg/apis/runtime/v1" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // StopPodSandbox stops the sandbox. If there are any running containers in the diff --git a/pkg/cri/server/service_test.go b/pkg/cri/server/service_test.go index 4b1e4aaa48..4d8cc047bd 100644 --- a/pkg/cri/server/service_test.go +++ b/pkg/cri/server/service_test.go @@ -29,8 +29,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/store/label" sandboxstore "github.com/containerd/containerd/v2/pkg/cri/store/sandbox" servertesting "github.com/containerd/containerd/v2/pkg/cri/testing" - "github.com/containerd/containerd/v2/pkg/errdefs" ostesting "github.com/containerd/containerd/v2/pkg/os/testing" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ) diff --git a/pkg/cri/store/container/container.go b/pkg/cri/store/container/container.go index 069f0af909..e3839c6d47 100644 --- a/pkg/cri/store/container/container.go +++ b/pkg/cri/store/container/container.go @@ -25,7 +25,7 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/store" "github.com/containerd/containerd/v2/pkg/cri/store/label" "github.com/containerd/containerd/v2/pkg/cri/store/stats" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" ) diff --git a/pkg/cri/store/container/container_test.go b/pkg/cri/store/container/container_test.go index 71b6251671..56143c5b52 100644 --- a/pkg/cri/store/container/container_test.go +++ b/pkg/cri/store/container/container_test.go @@ -24,7 +24,7 @@ import ( cio "github.com/containerd/containerd/v2/pkg/cri/io" "github.com/containerd/containerd/v2/pkg/cri/store/label" "github.com/containerd/containerd/v2/pkg/cri/store/stats" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/selinux/go-selinux" assertlib "github.com/stretchr/testify/assert" diff --git a/pkg/cri/store/image/image.go b/pkg/cri/store/image/image.go index 34ecc1d04f..bcbd515df9 100644 --- a/pkg/cri/store/image/image.go +++ b/pkg/cri/store/image/image.go @@ -27,7 +27,7 @@ import ( "github.com/containerd/containerd/v2/core/images/usage" "github.com/containerd/containerd/v2/pkg/cri/labels" "github.com/containerd/containerd/v2/pkg/cri/util" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/platforms" docker "github.com/distribution/reference" "k8s.io/apimachinery/pkg/util/sets" diff --git a/pkg/cri/store/image/image_test.go b/pkg/cri/store/image/image_test.go index fbaa6864f9..5376cb6176 100644 --- a/pkg/cri/store/image/image_test.go +++ b/pkg/cri/store/image/image_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "k8s.io/apimachinery/pkg/util/sets" "github.com/opencontainers/go-digest/digestset" diff --git a/pkg/cri/store/sandbox/sandbox.go b/pkg/cri/store/sandbox/sandbox.go index f88db82a10..9e4aa58cb2 100644 --- a/pkg/cri/store/sandbox/sandbox.go +++ b/pkg/cri/store/sandbox/sandbox.go @@ -24,8 +24,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/store" "github.com/containerd/containerd/v2/pkg/cri/store/label" "github.com/containerd/containerd/v2/pkg/cri/store/stats" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/netns" + "github.com/containerd/errdefs" ) // Sandbox contains all resources associated with the sandbox. All methods to diff --git a/pkg/cri/store/sandbox/sandbox_test.go b/pkg/cri/store/sandbox/sandbox_test.go index ec389144d2..5e70f75d2d 100644 --- a/pkg/cri/store/sandbox/sandbox_test.go +++ b/pkg/cri/store/sandbox/sandbox_test.go @@ -22,7 +22,7 @@ import ( "github.com/containerd/containerd/v2/pkg/cri/store/label" "github.com/containerd/containerd/v2/pkg/cri/store/stats" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" assertlib "github.com/stretchr/testify/assert" runtime "k8s.io/cri-api/pkg/apis/runtime/v1" diff --git a/pkg/cri/store/snapshot/snapshot.go b/pkg/cri/store/snapshot/snapshot.go index 13614fb755..4188779083 100644 --- a/pkg/cri/store/snapshot/snapshot.go +++ b/pkg/cri/store/snapshot/snapshot.go @@ -20,7 +20,7 @@ import ( "sync" snapshot "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) type Key struct { diff --git a/pkg/cri/store/snapshot/snapshot_test.go b/pkg/cri/store/snapshot/snapshot_test.go index 5a4da9ee1a..20add72b15 100644 --- a/pkg/cri/store/snapshot/snapshot_test.go +++ b/pkg/cri/store/snapshot/snapshot_test.go @@ -21,7 +21,7 @@ import ( "time" snapshot "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" assertlib "github.com/stretchr/testify/assert" ) diff --git a/pkg/events/exchange/exchange.go b/pkg/events/exchange/exchange.go index 269d1e2580..6eaeb40df1 100644 --- a/pkg/events/exchange/exchange.go +++ b/pkg/events/exchange/exchange.go @@ -22,11 +22,11 @@ import ( "strings" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" goevents "github.com/docker/go-events" diff --git a/pkg/events/exchange/exchange_test.go b/pkg/events/exchange/exchange_test.go index a6f9ece605..09b79a6324 100644 --- a/pkg/events/exchange/exchange_test.go +++ b/pkg/events/exchange/exchange_test.go @@ -23,10 +23,10 @@ import ( "time" eventstypes "github.com/containerd/containerd/v2/api/events" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "github.com/google/go-cmp/cmp" ) diff --git a/pkg/filters/parser.go b/pkg/filters/parser.go index b50511363a..f07fd33bd2 100644 --- a/pkg/filters/parser.go +++ b/pkg/filters/parser.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) /* diff --git a/pkg/identifiers/validate.go b/pkg/identifiers/validate.go index 92bba3f6f6..0acbf3fc4b 100644 --- a/pkg/identifiers/validate.go +++ b/pkg/identifiers/validate.go @@ -28,7 +28,7 @@ import ( "fmt" "regexp" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) const ( diff --git a/pkg/identifiers/validate_test.go b/pkg/identifiers/validate_test.go index 077ece9f97..615e6ab7d2 100644 --- a/pkg/identifiers/validate_test.go +++ b/pkg/identifiers/validate_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) func TestValidIdentifiers(t *testing.T) { diff --git a/pkg/labels/validate.go b/pkg/labels/validate.go index e19a019d35..6f23cdd7c6 100644 --- a/pkg/labels/validate.go +++ b/pkg/labels/validate.go @@ -19,7 +19,7 @@ package labels import ( "fmt" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) const ( diff --git a/pkg/labels/validate_test.go b/pkg/labels/validate_test.go index 96d7527369..16be11df3f 100644 --- a/pkg/labels/validate_test.go +++ b/pkg/labels/validate_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/stretchr/testify/assert" ) diff --git a/pkg/namespaces/context.go b/pkg/namespaces/context.go index 2cd50d6406..dbbc28615d 100644 --- a/pkg/namespaces/context.go +++ b/pkg/namespaces/context.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/identifiers" + "github.com/containerd/errdefs" ) const ( diff --git a/pkg/nri/domain.go b/pkg/nri/domain.go index 319be05f54..86a11a5af0 100644 --- a/pkg/nri/domain.go +++ b/pkg/nri/domain.go @@ -21,8 +21,8 @@ import ( "fmt" "sync" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" nri "github.com/containerd/nri/pkg/adaptation" ) diff --git a/pkg/oci/spec_opts_test.go b/pkg/oci/spec_opts_test.go index 8033d1ada9..1638dcfd2c 100644 --- a/pkg/oci/spec_opts_test.go +++ b/pkg/oci/spec_opts_test.go @@ -38,8 +38,8 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" ) type blob []byte diff --git a/pkg/rootfs/apply.go b/pkg/rootfs/apply.go index ac9115669c..2955d549f4 100644 --- a/pkg/rootfs/apply.go +++ b/pkg/rootfs/apply.go @@ -26,7 +26,7 @@ import ( "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" "github.com/opencontainers/image-spec/identity" diff --git a/pkg/tracing/plugin/otlp.go b/pkg/tracing/plugin/otlp.go index b972a0e54a..489233a7c2 100644 --- a/pkg/tracing/plugin/otlp.go +++ b/pkg/tracing/plugin/otlp.go @@ -24,9 +24,9 @@ import ( "net/url" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/tracing" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "github.com/sirupsen/logrus" diff --git a/pkg/tracing/plugin/otlp_test.go b/pkg/tracing/plugin/otlp_test.go index 1f31705f6b..2f314b4df1 100644 --- a/pkg/tracing/plugin/otlp_test.go +++ b/pkg/tracing/plugin/otlp_test.go @@ -21,7 +21,7 @@ import ( "errors" "testing" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" ) diff --git a/pkg/transfer/image/imagestore.go b/pkg/transfer/image/imagestore.go index 16cb86631b..9802966b31 100644 --- a/pkg/transfer/image/imagestore.go +++ b/pkg/transfer/image/imagestore.go @@ -29,10 +29,10 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/images/archive" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/transfer/plugins" + "github.com/containerd/errdefs" "github.com/containerd/platforms" ) diff --git a/pkg/transfer/image/imagestore_test.go b/pkg/transfer/image/imagestore_test.go index 2a233dfcf1..5c4a450250 100644 --- a/pkg/transfer/image/imagestore_test.go +++ b/pkg/transfer/image/imagestore_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/transfer/local/import.go b/pkg/transfer/local/import.go index 73182f652f..2ff5a21d58 100644 --- a/pkg/transfer/local/import.go +++ b/pkg/transfer/local/import.go @@ -25,9 +25,9 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/unpack" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/transfer/local/pull.go b/pkg/transfer/local/pull.go index 19ea9f9366..16287e4e85 100644 --- a/pkg/transfer/local/pull.go +++ b/pkg/transfer/local/pull.go @@ -25,9 +25,9 @@ import ( "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/defaults" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/unpack" + "github.com/containerd/errdefs" "github.com/containerd/log" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/sirupsen/logrus" diff --git a/pkg/transfer/local/push.go b/pkg/transfer/local/push.go index 120ae16883..52aa6b1bc2 100644 --- a/pkg/transfer/local/push.go +++ b/pkg/transfer/local/push.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/transfer" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/transfer/local/transfer.go b/pkg/transfer/local/transfer.go index 43d7a6f956..99c4b3c076 100644 --- a/pkg/transfer/local/transfer.go +++ b/pkg/transfer/local/transfer.go @@ -29,10 +29,10 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/internal/kmutex" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/imageverifier" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/unpack" + "github.com/containerd/errdefs" ) type localTransferService struct { diff --git a/pkg/transfer/plugins/plugins.go b/pkg/transfer/plugins/plugins.go index d2c1e3de09..1769fea3c1 100644 --- a/pkg/transfer/plugins/plugins.go +++ b/pkg/transfer/plugins/plugins.go @@ -21,7 +21,7 @@ import ( "reflect" "sync" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/pkg/unpack/unpacker.go b/pkg/unpack/unpacker.go index 07bcc769b3..91d9e81118 100644 --- a/pkg/unpack/unpacker.go +++ b/pkg/unpack/unpacker.go @@ -35,9 +35,9 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/internal/cleanup" "github.com/containerd/containerd/v2/internal/kmutex" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/pkg/tracing" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/opencontainers/go-digest" diff --git a/plugins/content/local/locks.go b/plugins/content/local/locks.go index 1601aaade6..4caffcc02f 100644 --- a/plugins/content/local/locks.go +++ b/plugins/content/local/locks.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // Handles locking references diff --git a/plugins/content/local/readerat.go b/plugins/content/local/readerat.go index 096da8da03..59198fd6e9 100644 --- a/plugins/content/local/readerat.go +++ b/plugins/content/local/readerat.go @@ -22,7 +22,7 @@ import ( "os" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" ) // readerat implements io.ReaderAt in a completely stateless manner by opening diff --git a/plugins/content/local/store.go b/plugins/content/local/store.go index 02f8a6a11b..4b06351a0d 100644 --- a/plugins/content/local/store.go +++ b/plugins/content/local/store.go @@ -28,8 +28,8 @@ import ( "time" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" diff --git a/plugins/content/local/store_test.go b/plugins/content/local/store_test.go index 905d81bd07..6253a4e1fd 100644 --- a/plugins/content/local/store_test.go +++ b/plugins/content/local/store_test.go @@ -36,7 +36,7 @@ import ( "github.com/containerd/containerd/v2/core/content/testsuite" "github.com/containerd/containerd/v2/internal/randutil" "github.com/containerd/containerd/v2/internal/testutil" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/plugins/content/local/writer.go b/plugins/content/local/writer.go index a3a4aa1c97..26cef0aaed 100644 --- a/plugins/content/local/writer.go +++ b/plugins/content/local/writer.go @@ -27,7 +27,7 @@ import ( "time" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" ) diff --git a/plugins/diff/lcow/lcow.go b/plugins/diff/lcow/lcow.go index 9f87658e0c..dec9bed12d 100644 --- a/plugins/diff/lcow/lcow.go +++ b/plugins/diff/lcow/lcow.go @@ -34,8 +34,8 @@ import ( "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/containerd/v2/core/metadata" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/diff/walking/differ.go b/plugins/diff/walking/differ.go index ab7f14f502..92080b157d 100644 --- a/plugins/diff/walking/differ.go +++ b/plugins/diff/walking/differ.go @@ -31,8 +31,8 @@ import ( "github.com/containerd/containerd/v2/pkg/archive" "github.com/containerd/containerd/v2/pkg/archive/compression" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" + "github.com/containerd/errdefs" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/plugins/diff/windows/cimfs.go b/plugins/diff/windows/cimfs.go index d4985ce0d7..218b70336f 100644 --- a/plugins/diff/windows/cimfs.go +++ b/plugins/diff/windows/cimfs.go @@ -29,8 +29,8 @@ import ( "github.com/containerd/containerd/v2/core/metadata" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/pkg/archive" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/platforms" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/diff/windows/windows.go b/plugins/diff/windows/windows.go index d9fec7e120..35bd9efa87 100644 --- a/plugins/diff/windows/windows.go +++ b/plugins/diff/windows/windows.go @@ -35,9 +35,9 @@ import ( "github.com/containerd/containerd/v2/pkg/archive" "github.com/containerd/containerd/v2/pkg/archive/compression" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/labels" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/plugins/metadata/plugin.go b/plugins/metadata/plugin.go index 3146e3f132..a77e6e1423 100644 --- a/plugins/metadata/plugin.go +++ b/plugins/metadata/plugin.go @@ -25,10 +25,10 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/metadata" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/timeout" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/sandbox/controller.go b/plugins/sandbox/controller.go index 1020bff73a..fe2dcb4e79 100644 --- a/plugins/sandbox/controller.go +++ b/plugins/sandbox/controller.go @@ -27,10 +27,10 @@ import ( "github.com/containerd/containerd/v2/core/runtime" v2 "github.com/containerd/containerd/v2/core/runtime/v2" "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/events/exchange" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/plugins/services/containers/local.go b/plugins/services/containers/local.go index 01b70e78e3..3c79c1bad1 100644 --- a/plugins/services/containers/local.go +++ b/plugins/services/containers/local.go @@ -24,11 +24,11 @@ import ( api "github.com/containerd/containerd/v2/api/services/containers/v1" "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/metadata" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" bolt "go.etcd.io/bbolt" diff --git a/plugins/services/content/contentserver/contentserver.go b/plugins/services/content/contentserver/contentserver.go index 130889efa7..4099df18a6 100644 --- a/plugins/services/content/contentserver/contentserver.go +++ b/plugins/services/content/contentserver/contentserver.go @@ -24,9 +24,9 @@ import ( api "github.com/containerd/containerd/v2/api/services/content/v1" "github.com/containerd/containerd/v2/core/content" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/plugins/services/diff/local.go b/plugins/services/diff/local.go index c59c63379f..4471c2fdd1 100644 --- a/plugins/services/diff/local.go +++ b/plugins/services/diff/local.go @@ -23,10 +23,10 @@ import ( diffapi "github.com/containerd/containerd/v2/api/services/diff/v1" "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/containerd/v2/core/mount" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "github.com/containerd/typeurl/v2" diff --git a/plugins/services/events/service.go b/plugins/services/events/service.go index 0abdffd0a8..3bea134670 100644 --- a/plugins/services/events/service.go +++ b/plugins/services/events/service.go @@ -22,12 +22,12 @@ import ( api "github.com/containerd/containerd/v2/api/services/events/v1" apittrpc "github.com/containerd/containerd/v2/api/services/ttrpc/events/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/events/exchange" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "github.com/containerd/ttrpc" diff --git a/plugins/services/events/ttrpc.go b/plugins/services/events/ttrpc.go index 37a19d047b..dc0d4f4fc7 100644 --- a/plugins/services/events/ttrpc.go +++ b/plugins/services/events/ttrpc.go @@ -20,11 +20,11 @@ import ( "context" api "github.com/containerd/containerd/v2/api/services/ttrpc/events/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/events/exchange" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" ) type ttrpcService struct { diff --git a/plugins/services/images/local.go b/plugins/services/images/local.go index 80d2494b9a..9adb90c8fc 100644 --- a/plugins/services/images/local.go +++ b/plugins/services/images/local.go @@ -30,13 +30,13 @@ import ( "github.com/containerd/containerd/v2/core/metadata" "github.com/containerd/containerd/v2/pkg/deprecation" "github.com/containerd/containerd/v2/pkg/epoch" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/gc" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" "github.com/containerd/containerd/v2/plugins/services/warning" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" ) diff --git a/plugins/services/introspection/introspection.go b/plugins/services/introspection/introspection.go index 1ae0ad810e..b455dc3eed 100644 --- a/plugins/services/introspection/introspection.go +++ b/plugins/services/introspection/introspection.go @@ -20,8 +20,8 @@ import ( context "context" api "github.com/containerd/containerd/v2/api/services/introspection/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/plugins/services/introspection/local.go b/plugins/services/introspection/local.go index 65a77e2672..29f261d9e4 100644 --- a/plugins/services/introspection/local.go +++ b/plugins/services/introspection/local.go @@ -33,13 +33,13 @@ import ( api "github.com/containerd/containerd/v2/api/services/introspection/v1" "github.com/containerd/containerd/v2/api/types" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" "github.com/containerd/containerd/v2/plugins/services/warning" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "github.com/containerd/typeurl/v2" diff --git a/plugins/services/leases/service.go b/plugins/services/leases/service.go index 38d0b0aeb6..813a1b8c0a 100644 --- a/plugins/services/leases/service.go +++ b/plugins/services/leases/service.go @@ -21,10 +21,10 @@ import ( api "github.com/containerd/containerd/v2/api/services/leases/v1" "github.com/containerd/containerd/v2/core/leases" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" "google.golang.org/grpc" diff --git a/plugins/services/namespaces/local.go b/plugins/services/namespaces/local.go index 4451790e6c..7ca6f0f2d5 100644 --- a/plugins/services/namespaces/local.go +++ b/plugins/services/namespaces/local.go @@ -23,12 +23,12 @@ import ( eventstypes "github.com/containerd/containerd/v2/api/events" api "github.com/containerd/containerd/v2/api/services/namespaces/v1" "github.com/containerd/containerd/v2/core/metadata" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" bolt "go.etcd.io/bbolt" diff --git a/plugins/services/sandbox/controller_service.go b/plugins/services/sandbox/controller_service.go index 3909f7be15..f9581d552c 100644 --- a/plugins/services/sandbox/controller_service.go +++ b/plugins/services/sandbox/controller_service.go @@ -27,10 +27,10 @@ import ( eventtypes "github.com/containerd/containerd/v2/api/events" api "github.com/containerd/containerd/v2/api/services/sandbox/v1" "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/services/sandbox/store_service.go b/plugins/services/sandbox/store_service.go index e6e761450d..65ef21b0e9 100644 --- a/plugins/services/sandbox/store_service.go +++ b/plugins/services/sandbox/store_service.go @@ -24,8 +24,8 @@ import ( api "github.com/containerd/containerd/v2/api/services/sandbox/v1" "github.com/containerd/containerd/v2/api/types" "github.com/containerd/containerd/v2/core/sandbox" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/services/snapshots/service.go b/plugins/services/snapshots/service.go index 6356d685a7..f0de4a976f 100644 --- a/plugins/services/snapshots/service.go +++ b/plugins/services/snapshots/service.go @@ -22,10 +22,10 @@ import ( snapshotsapi "github.com/containerd/containerd/v2/api/services/snapshots/v1" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/plugins/services" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/services/streaming/service.go b/plugins/services/streaming/service.go index f8224fec1b..e65f63106a 100644 --- a/plugins/services/streaming/service.go +++ b/plugins/services/streaming/service.go @@ -21,11 +21,11 @@ import ( "io" api "github.com/containerd/containerd/v2/api/services/streaming/v1" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/containerd/v2/protobuf" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/services/tasks/local.go b/plugins/services/tasks/local.go index ee64c88d62..25224d3400 100644 --- a/plugins/services/tasks/local.go +++ b/plugins/services/tasks/local.go @@ -38,7 +38,6 @@ import ( "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" "github.com/containerd/containerd/v2/pkg/archive" "github.com/containerd/containerd/v2/pkg/blockio" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/events" "github.com/containerd/containerd/v2/pkg/filters" "github.com/containerd/containerd/v2/pkg/rdt" @@ -48,6 +47,7 @@ import ( "github.com/containerd/containerd/v2/protobuf" "github.com/containerd/containerd/v2/protobuf/proto" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/services/transfer/service.go b/plugins/services/transfer/service.go index cface0dda5..8d921dbaa0 100644 --- a/plugins/services/transfer/service.go +++ b/plugins/services/transfer/service.go @@ -22,13 +22,13 @@ import ( transferapi "github.com/containerd/containerd/v2/api/services/transfer/v1" "github.com/containerd/containerd/v2/api/types" transferTypes "github.com/containerd/containerd/v2/api/types/transfer" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/pkg/transfer" tplugins "github.com/containerd/containerd/v2/pkg/transfer/plugins" "github.com/containerd/containerd/v2/plugins" ptypes "github.com/containerd/containerd/v2/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/snapshots/devmapper/metadata.go b/plugins/snapshots/devmapper/metadata.go index 81f467373b..f6dc0e3fb9 100644 --- a/plugins/snapshots/devmapper/metadata.go +++ b/plugins/snapshots/devmapper/metadata.go @@ -25,7 +25,7 @@ import ( "fmt" "strconv" - "github.com/containerd/containerd/v2/pkg/errdefs" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/plugins/snapshots/devmapper/snapshotter.go b/plugins/snapshots/devmapper/snapshotter.go index 5b0199db5e..650b79de0f 100644 --- a/plugins/snapshots/devmapper/snapshotter.go +++ b/plugins/snapshots/devmapper/snapshotter.go @@ -31,8 +31,8 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/storage" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins/snapshots/devmapper/dmsetup" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/plugins/snapshots/lcow/lcow.go b/plugins/snapshots/lcow/lcow.go index 43808275c6..78d4bc4989 100644 --- a/plugins/snapshots/lcow/lcow.go +++ b/plugins/snapshots/lcow/lcow.go @@ -37,9 +37,9 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/storage" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/continuity/fs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" diff --git a/plugins/snapshots/windows/cimfs.go b/plugins/snapshots/windows/cimfs.go index f60214267a..b5b979161f 100644 --- a/plugins/snapshots/windows/cimfs.go +++ b/plugins/snapshots/windows/cimfs.go @@ -32,8 +32,8 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/storage" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/plugins/snapshots/windows/windows.go b/plugins/snapshots/windows/windows.go index 87588eac23..9c6130b6d5 100644 --- a/plugins/snapshots/windows/windows.go +++ b/plugins/snapshots/windows/windows.go @@ -32,9 +32,9 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/core/snapshots/storage" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/plugins" "github.com/containerd/continuity/fs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/plugins/streaming/manager.go b/plugins/streaming/manager.go index 4548c7d75e..8a3cddffb1 100644 --- a/plugins/streaming/manager.go +++ b/plugins/streaming/manager.go @@ -23,11 +23,11 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/metadata" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/gc" "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/plugin" "github.com/containerd/plugin/registry" ) diff --git a/plugins/transfer/plugin.go b/plugins/transfer/plugin.go index a3ea0d1830..5737b29365 100644 --- a/plugins/transfer/plugin.go +++ b/plugins/transfer/plugin.go @@ -23,11 +23,11 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/containerd/v2/core/metadata" "github.com/containerd/containerd/v2/defaults" - "github.com/containerd/containerd/v2/pkg/errdefs" "github.com/containerd/containerd/v2/pkg/imageverifier" "github.com/containerd/containerd/v2/pkg/transfer/local" "github.com/containerd/containerd/v2/pkg/unpack" "github.com/containerd/containerd/v2/plugins" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/containerd/plugin" diff --git a/vendor/github.com/containerd/errdefs/LICENSE b/vendor/github.com/containerd/errdefs/LICENSE new file mode 100644 index 0000000000..584149b6ee --- /dev/null +++ b/vendor/github.com/containerd/errdefs/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/containerd/errdefs/README.md b/vendor/github.com/containerd/errdefs/README.md new file mode 100644 index 0000000000..bd418c63f9 --- /dev/null +++ b/vendor/github.com/containerd/errdefs/README.md @@ -0,0 +1,13 @@ +# errdefs + +A Go package for defining and checking common containerd errors. + +## Project details + +**errdefs** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/errdefs/errors.go b/vendor/github.com/containerd/errdefs/errors.go new file mode 100644 index 0000000000..8762255970 --- /dev/null +++ b/vendor/github.com/containerd/errdefs/errors.go @@ -0,0 +1,92 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with fmt.Errorf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +// +// The functions ToGRPC and FromGRPC can be used to map server-side and +// client-side errors to the correct types. +package errdefs + +import ( + "context" + "errors" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// For the most part, we just try to provide local grpc errors. Most conditions +// map very well to those defined by grpc. +var ( + ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. + ErrInvalidArgument = errors.New("invalid argument") + ErrNotFound = errors.New("not found") + ErrAlreadyExists = errors.New("already exists") + ErrFailedPrecondition = errors.New("failed precondition") + ErrUnavailable = errors.New("unavailable") + ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented +) + +// IsInvalidArgument returns true if the error is due to an invalid argument +func IsInvalidArgument(err error) bool { + return errors.Is(err, ErrInvalidArgument) +} + +// IsNotFound returns true if the error is due to a missing object +func IsNotFound(err error) bool { + return errors.Is(err, ErrNotFound) +} + +// IsAlreadyExists returns true if the error is due to an already existing +// metadata item +func IsAlreadyExists(err error) bool { + return errors.Is(err, ErrAlreadyExists) +} + +// IsFailedPrecondition returns true if an operation could not proceed to the +// lack of a particular condition +func IsFailedPrecondition(err error) bool { + return errors.Is(err, ErrFailedPrecondition) +} + +// IsUnavailable returns true if the error is due to a resource being unavailable +func IsUnavailable(err error) bool { + return errors.Is(err, ErrUnavailable) +} + +// IsNotImplemented returns true if the error is due to not being implemented +func IsNotImplemented(err error) bool { + return errors.Is(err, ErrNotImplemented) +} + +// IsCanceled returns true if the error is due to `context.Canceled`. +func IsCanceled(err error) bool { + return errors.Is(err, context.Canceled) +} + +// IsDeadlineExceeded returns true if the error is due to +// `context.DeadlineExceeded`. +func IsDeadlineExceeded(err error) bool { + return errors.Is(err, context.DeadlineExceeded) +} diff --git a/vendor/github.com/containerd/errdefs/grpc.go b/vendor/github.com/containerd/errdefs/grpc.go new file mode 100644 index 0000000000..7a9b33e05a --- /dev/null +++ b/vendor/github.com/containerd/errdefs/grpc.go @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import ( + "context" + "fmt" + "strings" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + if err == nil { + return nil + } + + if isGRPCError(err) { + // error has already been mapped to grpc + return err + } + + switch { + case IsInvalidArgument(err): + return status.Errorf(codes.InvalidArgument, err.Error()) + case IsNotFound(err): + return status.Errorf(codes.NotFound, err.Error()) + case IsAlreadyExists(err): + return status.Errorf(codes.AlreadyExists, err.Error()) + case IsFailedPrecondition(err): + return status.Errorf(codes.FailedPrecondition, err.Error()) + case IsUnavailable(err): + return status.Errorf(codes.Unavailable, err.Error()) + case IsNotImplemented(err): + return status.Errorf(codes.Unimplemented, err.Error()) + case IsCanceled(err): + return status.Errorf(codes.Canceled, err.Error()) + case IsDeadlineExceeded(err): + return status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + return err +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errdefs.ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + if err == nil { + return nil + } + + var cls error // divide these into error classes, becomes the cause + + switch code(err) { + case codes.InvalidArgument: + cls = ErrInvalidArgument + case codes.AlreadyExists: + cls = ErrAlreadyExists + case codes.NotFound: + cls = ErrNotFound + case codes.Unavailable: + cls = ErrUnavailable + case codes.FailedPrecondition: + cls = ErrFailedPrecondition + case codes.Unimplemented: + cls = ErrNotImplemented + case codes.Canceled: + cls = context.Canceled + case codes.DeadlineExceeded: + cls = context.DeadlineExceeded + default: + cls = ErrUnknown + } + + msg := rebaseMessage(cls, err) + if msg != "" { + err = fmt.Errorf("%s: %w", msg, cls) + } else { + err = cls + } + + return err +} + +// rebaseMessage removes the repeats for an error at the end of an error +// string. This will happen when taking an error over grpc then remapping it. +// +// Effectively, we just remove the string of cls from the end of err if it +// appears there. +func rebaseMessage(cls error, err error) string { + desc := errDesc(err) + clss := cls.Error() + if desc == clss { + return "" + } + + return strings.TrimSuffix(desc, ": "+clss) +} + +func isGRPCError(err error) bool { + _, ok := status.FromError(err) + return ok +} + +func code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +func errDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 962f4a8709..3559ca6c14 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -115,6 +115,9 @@ github.com/containerd/continuity/proto github.com/containerd/continuity/sysx github.com/containerd/continuity/testutil github.com/containerd/continuity/testutil/loopback +# github.com/containerd/errdefs v0.1.0 +## explicit; go 1.20 +github.com/containerd/errdefs # github.com/containerd/fifo v1.1.0 ## explicit; go 1.18 github.com/containerd/fifo