Skip to content

Commit

Permalink
Merge pull request containerd#10712 from dmcgowan/revert-errdefs
Browse files Browse the repository at this point in the history
[release/1.7] Revert errdefs package
  • Loading branch information
mxpv authored Sep 23, 2024
2 parents 7f7fdf5 + 1840323 commit 6fbbe70
Show file tree
Hide file tree
Showing 241 changed files with 1,325 additions and 911 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ linters-settings:
rules:
main:
deny:
- pkg: "github.com/containerd/containerd/errdefs"
desc: The containerd errdefs package was migrated to a separate module. Use github.com/containerd/errdefs instead.
- pkg: "github.com/containerd/containerd/log"
desc: The containerd log package was migrated to a separate module. Use github.com/containerd/log instead.
- pkg: "github.com/containerd/containerd/platforms"
Expand Down
21 changes: 11 additions & 10 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ import (
"sync"
"time"

"github.com/containerd/platforms"
"github.com/containerd/typeurl/v2"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sync/semaphore"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/health/grpc_health_v1"

containersapi "github.com/containerd/containerd/api/services/containers/v1"
contentapi "github.com/containerd/containerd/api/services/content/v1"
diffapi "github.com/containerd/containerd/api/services/diff/v1"
Expand All @@ -44,6 +54,7 @@ import (
"github.com/containerd/containerd/content"
contentproxy "github.com/containerd/containerd/content/proxy"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/events"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/leases"
Expand All @@ -59,16 +70,6 @@ import (
"github.com/containerd/containerd/services/introspection"
"github.com/containerd/containerd/snapshots"
snproxy "github.com/containerd/containerd/snapshots/proxy"
"github.com/containerd/errdefs"
"github.com/containerd/platforms"
"github.com/containerd/typeurl/v2"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sync/semaphore"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/health/grpc_health_v1"
)

func init() {
Expand Down
9 changes: 5 additions & 4 deletions cmd/containerd/command/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ import (
"runtime"
"time"

"github.com/containerd/log"
"github.com/urfave/cli"
"google.golang.org/grpc/grpclog"

"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/errdefs"
_ "github.com/containerd/containerd/metrics" // import containerd build info
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/services/server"
srvconfig "github.com/containerd/containerd/services/server/config"
"github.com/containerd/containerd/sys"
"github.com/containerd/containerd/version"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/urfave/cli"
"google.golang.org/grpc/grpclog"
)

const usage = `
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd/command/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"time"

eventsapi "github.com/containerd/containerd/api/services/events/v1"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/pkg/dialer"
"github.com/containerd/containerd/protobuf/proto"
"github.com/containerd/containerd/protobuf/types"
"github.com/containerd/errdefs"
"github.com/urfave/cli"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd/command/service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"path/filepath"
"time"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/services/server"
"github.com/containerd/errdefs"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"golang.org/x/sys/windows"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/containers/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/containerd/containerd"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/cmd/ctr/commands/run"
"github.com/containerd/containerd/containers"
"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/log"
"github.com/containerd/typeurl/v2"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/containers/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/cmd/ctr/commands/tasks"
"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
Expand Down
9 changes: 5 additions & 4 deletions cmd/ctr/commands/content/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ import (
"text/tabwriter"
"time"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/remotes"
"github.com/containerd/errdefs"
"github.com/containerd/log"
units "github.com/docker/go-units"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/remotes"
)

var (
Expand Down
13 changes: 7 additions & 6 deletions cmd/ctr/commands/content/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ import (
"text/tabwriter"
"time"

"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"

"github.com/containerd/containerd"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/pkg/progress"
"github.com/containerd/containerd/remotes"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
)

var fetchCommand = cli.Command{
Expand Down
9 changes: 5 additions & 4 deletions cmd/ctr/commands/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ import (
"strings"
"text/tabwriter"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/pkg/progress"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/urfave/cli"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/pkg/progress"
)

// Command is the cli command for managing images
Expand Down
9 changes: 5 additions & 4 deletions cmd/ctr/commands/images/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ import (
"fmt"
"time"

"github.com/containerd/platforms"
"github.com/opencontainers/image-spec/identity"
"github.com/urfave/cli"

"github.com/containerd/containerd"
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/mount"
"github.com/containerd/errdefs"
"github.com/containerd/platforms"
"github.com/opencontainers/image-spec/identity"
"github.com/urfave/cli"
)

var mountCommand = cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/urfave/cli"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/pkg/transfer/image"
"github.com/containerd/errdefs"
)

var tagCommand = cli.Command{
Expand Down
5 changes: 3 additions & 2 deletions cmd/ctr/commands/images/unmount.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ package images
import (
"fmt"

"github.com/urfave/cli"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/mount"
"github.com/containerd/errdefs"
"github.com/urfave/cli"
)

var unmountCommand = cli.Command{
Expand Down
5 changes: 3 additions & 2 deletions cmd/ctr/commands/namespaces/namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import (
"strings"
"text/tabwriter"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/urfave/cli"

"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/errdefs"
)

// Command is the cli command for managing namespaces
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"syscall"

"github.com/containerd/containerd"
"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
tasktypes "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/oci"
"github.com/containerd/containerd/protobuf"
"github.com/containerd/containerd/runtime/v2/runc/options"
"github.com/containerd/errdefs"
"github.com/containerd/fifo"
"github.com/containerd/typeurl/v2"
ver "github.com/opencontainers/image-spec/specs-go"
Expand Down
2 changes: 1 addition & 1 deletion container_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (

"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/oci"
"github.com/containerd/containerd/protobuf"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl/v2"
"github.com/opencontainers/image-spec/identity"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion container_opts_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"syscall"

"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/mount"
"github.com/containerd/errdefs"
"github.com/opencontainers/image-spec/identity"
)

Expand Down
2 changes: 1 addition & 1 deletion containerstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (

containersapi "github.com/containerd/containerd/api/services/containers/v1"
"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/protobuf"
ptypes "github.com/containerd/containerd/protobuf/types"
"github.com/containerd/errdefs"
"github.com/containerd/typeurl/v2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
5 changes: 3 additions & 2 deletions content/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ import (
"sync"
"time"

"github.com/containerd/containerd/pkg/randutil"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/pkg/randutil"
)

var ErrReset = errors.New("writer has been reset")
Expand Down
2 changes: 1 addition & 1 deletion content/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"testing"

"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
"github.com/opencontainers/go-digest"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion content/local/locks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sync"
"time"

"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
)

// Handles locking references
Expand Down
2 changes: 1 addition & 1 deletion content/local/readerat.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"

"github.com/containerd/containerd/content"
"github.com/containerd/errdefs"
"github.com/containerd/containerd/errdefs"
)

// readerat implements io.ReaderAt in a completely stateless manner by opening
Expand Down
7 changes: 4 additions & 3 deletions content/local/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ import (
"sync"
"time"

"github.com/containerd/log"
"github.com/sirupsen/logrus"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/filters"
"github.com/containerd/containerd/pkg/randutil"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/sirupsen/logrus"

"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion content/local/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/content/testsuite"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/pkg/randutil"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/errdefs"

"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
5 changes: 3 additions & 2 deletions content/local/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import (
"runtime"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
)

// writer represents a write transaction against the blob store.
Expand Down
Loading

0 comments on commit 6fbbe70

Please sign in to comment.