Skip to content

Commit

Permalink
Upgrade to containerd 2
Browse files Browse the repository at this point in the history
Signed-off-by: Marat Radchenko <[email protected]>
  • Loading branch information
slonopotamus committed Nov 12, 2024
1 parent 083af07 commit ae13fa9
Show file tree
Hide file tree
Showing 900 changed files with 52,102 additions and 23,299 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ COPY --link --from=binaries / /usr/bin/
FROM integration-tests-base AS integration-tests
COPY . .
ENV BUILDKIT_RUN_NETWORK_INTEGRATION_TESTS=1 BUILDKIT_CNI_INIT_LOCK_PATH=/run/buildkit_cni_bridge.lock
# containerd-2.0 disabled schema v1 support by default
# This needs to be fixed properly for containerd-2.1 that will drop schema v1 support completely
ENV CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1

FROM integration-tests AS dev-env
VOLUME /var/lib/buildkit
Expand Down
10 changes: 5 additions & 5 deletions cache/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"strconv"

"github.com/containerd/containerd/diff"
"github.com/containerd/containerd/diff/walking"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/v2/core/diff"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/plugins/diff/walking"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/util/bklog"
"github.com/moby/buildkit/util/compression"
Expand Down
6 changes: 3 additions & 3 deletions cache/blobs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"context"
"io"

"github.com/containerd/containerd/content"
labelspkg "github.com/containerd/containerd/labels"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/mount"
labelspkg "github.com/containerd/containerd/v2/pkg/labels"
cerrdefs "github.com/containerd/errdefs"
"github.com/moby/buildkit/util/bklog"
"github.com/moby/buildkit/util/compression"
Expand Down
2 changes: 1 addition & 1 deletion cache/blobs_nolinux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cache
import (
"context"

"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/v2/core/mount"
"github.com/moby/buildkit/util/compression"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions cache/compression_nydus.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"context"
"io"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/labels"
cerrdefs "github.com/containerd/errdefs"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/util/compression"
Expand Down
12 changes: 6 additions & 6 deletions cache/contenthash/checksum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"testing"
"time"

"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/diff/apply"
"github.com/containerd/containerd/diff/walking"
ctdmetadata "github.com/containerd/containerd/metadata"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/native"
"github.com/containerd/containerd/v2/core/diff/apply"
ctdmetadata "github.com/containerd/containerd/v2/core/metadata"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/plugins/content/local"
"github.com/containerd/containerd/v2/plugins/diff/walking"
"github.com/containerd/containerd/v2/plugins/snapshots/native"
"github.com/moby/buildkit/cache"
"github.com/moby/buildkit/cache/metadata"
"github.com/moby/buildkit/session"
Expand Down
2 changes: 1 addition & 1 deletion cache/filelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path"
"sort"

cdcompression "github.com/containerd/containerd/archive/compression"
cdcompression "github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/moby/buildkit/session"
)

Expand Down
12 changes: 6 additions & 6 deletions cache/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"sync"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/diff"
"github.com/containerd/containerd/filters"
"github.com/containerd/containerd/gc"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/diff"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/pkg/filters"
"github.com/containerd/containerd/v2/pkg/gc"
"github.com/containerd/containerd/v2/pkg/labels"
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/pkg/idtools"
"github.com/moby/buildkit/cache/metadata"
Expand Down
26 changes: 13 additions & 13 deletions cache/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ import (
"testing"
"time"

ctdcompression "github.com/containerd/containerd/archive/compression"
"github.com/containerd/containerd/archive/tarheader"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/diff/apply"
"github.com/containerd/containerd/diff/walking"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/leases"
ctdmetadata "github.com/containerd/containerd/metadata"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/native"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/diff/apply"
"github.com/containerd/containerd/v2/core/leases"
ctdmetadata "github.com/containerd/containerd/v2/core/metadata"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/core/snapshots"
ctdcompression "github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/containerd/containerd/v2/pkg/archive/tarheader"
"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/containerd/v2/plugins/diff/walking"
"github.com/containerd/containerd/v2/plugins/snapshots/native"
"github.com/containerd/continuity/fs/fstest"
cerrdefs "github.com/containerd/errdefs"
"github.com/containerd/stargz-snapshotter/estargz"
Expand Down
8 changes: 4 additions & 4 deletions cache/migrate_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/core/snapshots"
cerrdefs "github.com/containerd/errdefs"
"github.com/moby/buildkit/cache/metadata"
"github.com/moby/buildkit/snapshot"
Expand Down
2 changes: 1 addition & 1 deletion cache/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cache
import (
"fmt"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/v2/core/content"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/util/progress"
digest "github.com/opencontainers/go-digest"
Expand Down
12 changes: 6 additions & 6 deletions cache/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sync"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/labels"
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/pkg/idtools"
"github.com/hashicorp/go-multierror"
Expand Down
4 changes: 2 additions & 2 deletions cache/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/url"
"strings"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/reference"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/reference"
cerrdefs "github.com/containerd/errdefs"
"github.com/moby/buildkit/cache/config"
"github.com/moby/buildkit/session"
Expand Down
4 changes: 2 additions & 2 deletions cache/remotecache/azblob/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/moby/buildkit/cache/remotecache"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
Expand Down
4 changes: 2 additions & 2 deletions cache/remotecache/azblob/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"

"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/moby/buildkit/cache/remotecache"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
Expand Down
4 changes: 2 additions & 2 deletions cache/remotecache/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"encoding/json"
"fmt"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/solver"
Expand Down
4 changes: 2 additions & 2 deletions cache/remotecache/gha/gha.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sync"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/moby/buildkit/cache/remotecache"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
Expand Down
6 changes: 3 additions & 3 deletions cache/remotecache/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/labels"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/solver"
Expand Down
2 changes: 1 addition & 1 deletion cache/remotecache/inline/inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"slices"

"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/moby/buildkit/cache/remotecache"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
Expand Down
2 changes: 1 addition & 1 deletion cache/remotecache/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/v2/core/content"
"github.com/moby/buildkit/cache/remotecache"
"github.com/moby/buildkit/session"
sessioncontent "github.com/moby/buildkit/session/content"
Expand Down
6 changes: 3 additions & 3 deletions cache/remotecache/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"maps"
"strconv"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/remotes/docker"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/distribution/reference"
"github.com/moby/buildkit/cache/remotecache"
"github.com/moby/buildkit/session"
Expand Down
4 changes: 2 additions & 2 deletions cache/remotecache/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/labels"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/moby/buildkit/cache/remotecache"
v1 "github.com/moby/buildkit/cache/remotecache/v1"
"github.com/moby/buildkit/session"
Expand Down
2 changes: 1 addition & 1 deletion cache/remotecache/v1/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/containerd/containerd/content"
"github.com/containerd/containerd/v2/core/content"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/solver"
digest "github.com/opencontainers/go-digest"
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

contentapi "github.com/containerd/containerd/api/services/content/v1"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/v2/defaults"
controlapi "github.com/moby/buildkit/api/services/control"
"github.com/moby/buildkit/client/connhelper"
"github.com/moby/buildkit/session"
Expand Down
4 changes: 2 additions & 2 deletions client/client_nydus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"
"testing"

"github.com/containerd/containerd/images"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/nydus-snapshotter/pkg/converter"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/identity"
Expand Down
Loading

0 comments on commit ae13fa9

Please sign in to comment.