Skip to content

Commit

Permalink
Move to github.com/containerd/log
Browse files Browse the repository at this point in the history
Containerd moved their log package from in tree
github.com/containerd/containerd/log to it's own module at
github.com/containerd/log. The in-tree log is deprecated as of 1.7.7
which is tripping up the linter when we do the containerd update.

This change moves to the new log package.

Signed-off-by: Kern Walster <[email protected]>
  • Loading branch information
Kern-- authored and turan18 committed Oct 23, 2023
1 parent 31a8bcc commit 68b8fee
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion benchmark/benchmarkTests.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/awslabs/soci-snapshotter/benchmark/framework"
"github.com/containerd/containerd"
"github.com/containerd/containerd/log"
"github.com/containerd/log"
"github.com/google/uuid"
)

Expand Down
2 changes: 1 addition & 1 deletion benchmark/framework/containerd_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/oci"
"github.com/containerd/log"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion benchmark/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strconv"
"testing"

"github.com/containerd/containerd/log"
"github.com/containerd/log"
"github.com/montanaflynn/stats"
)

Expand Down
1 change: 1 addition & 0 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.20
require (
github.com/awslabs/soci-snapshotter v0.0.0-local
github.com/containerd/containerd v1.7.6
github.com/containerd/log v0.1.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/docker/cli v24.0.6+incompatible
github.com/docker/go-metrics v0.0.1
Expand Down
2 changes: 2 additions & 0 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ 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=
github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs=
github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
Expand Down
4 changes: 2 additions & 2 deletions cmd/soci-snapshotter-grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ import (
snapshotsapi "github.com/containerd/containerd/api/services/snapshots/v1"
"github.com/containerd/containerd/contrib/snapshotservice"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/pkg/dialer"
"github.com/containerd/containerd/snapshots"
runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/log"
sddaemon "github.com/coreos/go-systemd/v22/daemon"
metrics "github.com/docker/go-metrics"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
ctx, cancel := context.WithCancel(log.WithLogger(context.Background(), log.L))
defer cancel()
// Streams log of standard lib (go-fuse uses this) into debug log
// Snapshotter should use "github.com/containerd/containerd/log" otherwise
// Snapshotter should use "github.com/containerd/log" otherwise
// logs are always printed as "debug" mode.
golog.SetOutput(log.G(ctx).WriterLevel(logrus.DebugLevel))
log.G(ctx).WithFields(logrus.Fields{
Expand Down
2 changes: 1 addition & 1 deletion cmd/soci/commands/image/rpull.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/cmd/ctr/commands/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters"
"github.com/containerd/log"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion fs/artifact_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"github.com/awslabs/soci-snapshotter/soci/store"
socihttp "github.com/awslabs/soci-snapshotter/util/http"
"github.com/awslabs/soci-snapshotter/util/ioutils"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
"github.com/containerd/log"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/errgroup"
"oras.land/oras-go/v2/content"
Expand Down
2 changes: 1 addition & 1 deletion fs/backgroundfetcher/background_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

commonmetrics "github.com/awslabs/soci-snapshotter/fs/metrics/common"
"github.com/containerd/containerd/log"
"github.com/containerd/log"
"golang.org/x/time/rate"
)

Expand Down
2 changes: 1 addition & 1 deletion fs/backgroundfetcher/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
commonmetrics "github.com/awslabs/soci-snapshotter/fs/metrics/common"
sm "github.com/awslabs/soci-snapshotter/fs/span-manager"
"github.com/awslabs/soci-snapshotter/ztoc/compression"
"github.com/containerd/containerd/log"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ import (
"github.com/awslabs/soci-snapshotter/snapshot"
"github.com/awslabs/soci-snapshotter/soci"
"github.com/awslabs/soci-snapshotter/soci/store"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/mount"
ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters"
"github.com/containerd/containerd/reference"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/log"
metrics "github.com/docker/go-metrics"
fusefs "github.com/hanwen/go-fuse/v2/fs"
"github.com/hanwen/go-fuse/v2/fuse"
Expand Down
2 changes: 1 addition & 1 deletion fs/layer/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ import (
"github.com/awslabs/soci-snapshotter/util/lrucache"
"github.com/awslabs/soci-snapshotter/util/namedmutex"
"github.com/awslabs/soci-snapshotter/ztoc"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
"github.com/containerd/log"
fusefs "github.com/hanwen/go-fuse/v2/fs"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion fs/layer/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import (
"github.com/awslabs/soci-snapshotter/fs/reader"
"github.com/awslabs/soci-snapshotter/fs/remote"
"github.com/awslabs/soci-snapshotter/metadata"
"github.com/containerd/containerd/log"
"github.com/containerd/log"
fusefs "github.com/hanwen/go-fuse/v2/fs"
"github.com/hanwen/go-fuse/v2/fuse"
digest "github.com/opencontainers/go-digest"
Expand Down
2 changes: 1 addition & 1 deletion fs/remote/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ import (
"github.com/awslabs/soci-snapshotter/fs/source"
socihttp "github.com/awslabs/soci-snapshotter/util/http"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/log"
rhttp "github.com/hashicorp/go-retryablehttp"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ go 1.20
require (
github.com/containerd/containerd v1.7.6
github.com/containerd/continuity v0.4.2
github.com/containerd/log v0.1.0
github.com/docker/cli v24.0.6+incompatible
github.com/docker/go-metrics v0.0.1
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG
github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs=
github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
Expand Down
2 changes: 1 addition & 1 deletion service/keychain/cri/v1/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import (
"time"

"github.com/awslabs/soci-snapshotter/service/resolver"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
distribution "github.com/containerd/containerd/reference/docker"
"github.com/containerd/log"
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion service/keychain/cri/v1alpha/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import (
"time"

"github.com/awslabs/soci-snapshotter/service/resolver"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
distribution "github.com/containerd/containerd/reference/docker"
runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/log"
)

// NewCRIAlphaKeychain provides creds passed through CRI PullImage API.
Expand Down
2 changes: 1 addition & 1 deletion service/keychain/kubeconfig/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
"time"

"github.com/awslabs/soci-snapshotter/service/resolver"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/reference"
"github.com/containerd/log"
dcfile "github.com/docker/cli/cli/config/configfile"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion service/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ import (
"github.com/awslabs/soci-snapshotter/service/keychain/kubeconfig"
"github.com/awslabs/soci-snapshotter/service/resolver"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/pkg/dialer"
"github.com/containerd/containerd/platforms"
ctdplugin "github.com/containerd/containerd/plugin"
runtime_alpha "github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
"github.com/containerd/log"
grpc "google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials/insecure"
Expand Down
2 changes: 1 addition & 1 deletion service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import (
"github.com/awslabs/soci-snapshotter/fs/source"
"github.com/awslabs/soci-snapshotter/service/resolver"
snbase "github.com/awslabs/soci-snapshotter/snapshot"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/overlay/overlayutils"
"github.com/containerd/log"
)

type Option func(*options)
Expand Down
2 changes: 1 addition & 1 deletion snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ import (
commonmetrics "github.com/awslabs/soci-snapshotter/fs/metrics/common"
"github.com/awslabs/soci-snapshotter/fs/source"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/mount"
ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/overlay/overlayutils"
"github.com/containerd/containerd/snapshots/storage"
"github.com/containerd/continuity/fs"
"github.com/containerd/log"
"github.com/moby/sys/mountinfo"
"github.com/opencontainers/go-digest"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion soci/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/platforms"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
bolt "go.etcd.io/bbolt"
Expand Down
2 changes: 1 addition & 1 deletion soci/soci_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"github.com/awslabs/soci-snapshotter/ztoc/compression"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/platforms"
"github.com/containerd/log"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

Expand Down
2 changes: 1 addition & 1 deletion util/http/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/awslabs/soci-snapshotter/config"
"github.com/awslabs/soci-snapshotter/version"
"github.com/containerd/containerd/log"
"github.com/containerd/log"
rhttp "github.com/hashicorp/go-retryablehttp"
"github.com/sirupsen/logrus"
)
Expand Down

0 comments on commit 68b8fee

Please sign in to comment.