Skip to content

Commit

Permalink
Upgrade to containerd 2
Browse files Browse the repository at this point in the history
Co-authored-by: Derek McGowan <[email protected]>
Signed-off-by: Marat Radchenko <[email protected]>
  • Loading branch information
slonopotamus and dmcgowan committed Nov 14, 2024
1 parent 5fbf9a1 commit c4cda61
Show file tree
Hide file tree
Showing 924 changed files with 53,574 additions and 23,962 deletions.
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
28 changes: 14 additions & 14 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"testing"
"time"

"github.com/containerd/containerd"
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/content/proxy"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/snapshots"
ctd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/content/proxy"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes/docker"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/plugins/content/local"
"github.com/containerd/continuity/fs/fstest"
cerrdefs "github.com/containerd/errdefs"
"github.com/containerd/platforms"
Expand Down Expand Up @@ -274,8 +274,8 @@ func testIntegration(t *testing.T, funcs ...func(t *testing.T, sb integration.Sa
)
}

func newContainerd(cdAddress string) (*containerd.Client, error) {
return containerd.New(cdAddress, containerd.WithTimeout(60*time.Second))
func newContainerd(cdAddress string) (*ctd.Client, error) {
return ctd.New(cdAddress, ctd.WithTimeout(60*time.Second))
}

// moby/buildkit#1336
Expand Down Expand Up @@ -1239,7 +1239,7 @@ func testFrontendImageNaming(t *testing.T, sb integration.Sandbox) {

// TODO: make public pull helper function so this can be checked for standalone as well

client, err := containerd.New(cdAddress)
client, err := ctd.New(cdAddress)
require.NoError(t, err)
defer client.Close()

Expand Down Expand Up @@ -4071,7 +4071,7 @@ func testBuildExportWithUncompressed(t *testing.T, sb integration.Sandbox) {

ctx := namespaces.WithNamespace(sb.Context(), "buildkit")
cdAddress := sb.ContainerdAddress()
var client *containerd.Client
var client *ctd.Client
if cdAddress != "" {
client, err = newContainerd(cdAddress)
require.NoError(t, err)
Expand Down Expand Up @@ -6053,7 +6053,7 @@ func testRegistryEmptyCacheExport(t *testing.T, sb integration.Sandbox) {

ctx := namespaces.WithNamespace(sb.Context(), "buildkit")
cdAddress := sb.ContainerdAddress()
var client *containerd.Client
var client *ctd.Client
if cdAddress != "" {
client, err = newContainerd(cdAddress)
require.NoError(t, err)
Expand Down Expand Up @@ -8782,7 +8782,7 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) {
if cdAddress == "" {
return
}
client, err := containerd.New(cdAddress)
client, err := ctd.New(cdAddress)
require.NoError(t, err)
defer client.Close()
ctx := namespaces.WithNamespace(sb.Context(), "buildkit")
Expand Down
4 changes: 2 additions & 2 deletions client/llb/imagemetaresolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"sync"

"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/core/remotes/docker"
"github.com/containerd/platforms"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/client/llb/sourceresolver"
Expand Down
Loading

0 comments on commit c4cda61

Please sign in to comment.