diff --git a/benchmark/benchmarkTests.go b/benchmark/benchmarkTests.go index c066612b6..d90fdb2d4 100644 --- a/benchmark/benchmarkTests.go +++ b/benchmark/benchmarkTests.go @@ -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" ) diff --git a/benchmark/framework/containerd_utils.go b/benchmark/framework/containerd_utils.go index b0c2b1ced..4e8661c3d 100644 --- a/benchmark/framework/containerd_utils.go +++ b/benchmark/framework/containerd_utils.go @@ -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" ) diff --git a/benchmark/framework/framework.go b/benchmark/framework/framework.go index 28c3a7dd2..cb541f407 100644 --- a/benchmark/framework/framework.go +++ b/benchmark/framework/framework.go @@ -26,7 +26,7 @@ import ( "strconv" "testing" - "github.com/containerd/containerd/log" + "github.com/containerd/log" "github.com/montanaflynn/stats" ) diff --git a/cmd/go.mod b/cmd/go.mod index 9551a837d..1c1edec14 100644 --- a/cmd/go.mod +++ b/cmd/go.mod @@ -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 diff --git a/cmd/go.sum b/cmd/go.sum index 5b3a6eb9e..dc4ab256a 100644 --- a/cmd/go.sum +++ b/cmd/go.sum @@ -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= diff --git a/cmd/soci-snapshotter-grpc/main.go b/cmd/soci-snapshotter-grpc/main.go index 8576234ce..92c07c37b 100644 --- a/cmd/soci-snapshotter-grpc/main.go +++ b/cmd/soci-snapshotter-grpc/main.go @@ -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" @@ -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{ diff --git a/cmd/soci/commands/image/rpull.go b/cmd/soci/commands/image/rpull.go index a488170e0..dd5ee7011 100644 --- a/cmd/soci/commands/image/rpull.go +++ b/cmd/soci/commands/image/rpull.go @@ -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" ) diff --git a/fs/artifact_fetcher.go b/fs/artifact_fetcher.go index 34f0c9240..51eabe8bc 100644 --- a/fs/artifact_fetcher.go +++ b/fs/artifact_fetcher.go @@ -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" diff --git a/fs/backgroundfetcher/background_fetcher.go b/fs/backgroundfetcher/background_fetcher.go index dab82ff45..4fdad31ac 100644 --- a/fs/backgroundfetcher/background_fetcher.go +++ b/fs/backgroundfetcher/background_fetcher.go @@ -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" ) diff --git a/fs/backgroundfetcher/resolver.go b/fs/backgroundfetcher/resolver.go index 4f504f83f..ad744412d 100644 --- a/fs/backgroundfetcher/resolver.go +++ b/fs/backgroundfetcher/resolver.go @@ -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" ) diff --git a/fs/fs.go b/fs/fs.go index e780122e9..416faa620 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -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" diff --git a/fs/layer/layer.go b/fs/layer/layer.go index 5f8ebdec3..5640e9807 100644 --- a/fs/layer/layer.go +++ b/fs/layer/layer.go @@ -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" diff --git a/fs/layer/node.go b/fs/layer/node.go index 117e7734f..cacf62fca 100644 --- a/fs/layer/node.go +++ b/fs/layer/node.go @@ -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" diff --git a/fs/remote/resolver.go b/fs/remote/resolver.go index 4faef0e98..5ecfb4e42 100644 --- a/fs/remote/resolver.go +++ b/fs/remote/resolver.go @@ -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" diff --git a/go.mod b/go.mod index 307bc9fbc..0ff3f2763 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index d3a2493f8..a28ad178d 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/service/keychain/cri/v1/cri.go b/service/keychain/cri/v1/cri.go index 49e7f3316..d31fe9044 100644 --- a/service/keychain/cri/v1/cri.go +++ b/service/keychain/cri/v1/cri.go @@ -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" ) diff --git a/service/keychain/cri/v1alpha/cri.go b/service/keychain/cri/v1alpha/cri.go index ba7eef26b..9b52fc465 100644 --- a/service/keychain/cri/v1alpha/cri.go +++ b/service/keychain/cri/v1alpha/cri.go @@ -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. diff --git a/service/keychain/kubeconfig/kubeconfig.go b/service/keychain/kubeconfig/kubeconfig.go index 6afa48e6d..e0eed7fe6 100644 --- a/service/keychain/kubeconfig/kubeconfig.go +++ b/service/keychain/kubeconfig/kubeconfig.go @@ -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" diff --git a/service/plugin/plugin.go b/service/plugin/plugin.go index 39ca7c98d..6374bccab 100644 --- a/service/plugin/plugin.go +++ b/service/plugin/plugin.go @@ -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" diff --git a/service/service.go b/service/service.go index e8b933924..1695e1d34 100644 --- a/service/service.go +++ b/service/service.go @@ -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) diff --git a/snapshot/snapshot.go b/snapshot/snapshot.go index b80d8d901..499c8e1f5 100644 --- a/snapshot/snapshot.go +++ b/snapshot/snapshot.go @@ -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" diff --git a/soci/artifacts.go b/soci/artifacts.go index 62adfe718..634cd3009 100644 --- a/soci/artifacts.go +++ b/soci/artifacts.go @@ -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" diff --git a/soci/soci_index.go b/soci/soci_index.go index fc0287efc..653487aa3 100644 --- a/soci/soci_index.go +++ b/soci/soci_index.go @@ -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" diff --git a/util/http/retry.go b/util/http/retry.go index 0aeed9e21..a66288234 100644 --- a/util/http/retry.go +++ b/util/http/retry.go @@ -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" )