Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor containerd 2.0 #1958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"time"

task "github.com/containerd/containerd/api/runtime/task/v2"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"

"github.com/Microsoft/hcsshim/internal/oc"
"github.com/containerd/containerd/namespaces"
shim "github.com/containerd/containerd/runtime/v2/shim"
"github.com/containerd/containerd/v2/namespaces"
shim "github.com/containerd/containerd/v2/runtime/v2/shim"
"go.opencensus.io/trace"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"context"

task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/pkg/errors"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/containerd-shim-runhcs-v1/exec_hcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"sync"
"time"

eventstypes "github.com/containerd/containerd/api/events"
task "github.com/containerd/containerd/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
eventstypes "github.com/containerd/containerd/v2/api/events"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/v2/api/types/task"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/runtime"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"context"
"time"

task "github.com/containerd/containerd/api/runtime/task/v2"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/containerd-shim-runhcs-v1/exec_wcow_podsandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"time"

"github.com/Microsoft/hcsshim/internal/log"
eventstypes "github.com/containerd/containerd/api/events"
task "github.com/containerd/containerd/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
eventstypes "github.com/containerd/containerd/v2/api/events"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/v2/api/types/task"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/runtime"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down
6 changes: 3 additions & 3 deletions cmd/containerd-shim-runhcs-v1/exec_wcow_podsandbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

task "github.com/containerd/containerd/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/v2/api/types/task"
"github.com/containerd/containerd/v2/errdefs"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
hcsversion "github.com/Microsoft/hcsshim/internal/version"

// register common types spec with typeurl
_ "github.com/containerd/containerd/runtime"
_ "github.com/containerd/containerd/v2/runtime"
)

const usage = ``
Expand Down
8 changes: 4 additions & 4 deletions cmd/containerd-shim-runhcs-v1/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"github.com/Microsoft/hcsshim/internal/uvm"
"github.com/Microsoft/hcsshim/osversion"
"github.com/Microsoft/hcsshim/pkg/annotations"
eventstypes "github.com/containerd/containerd/api/events"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
eventstypes "github.com/containerd/containerd/v2/api/events"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/runtime"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sync"
"testing"

task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/containerd-shim-runhcs-v1/rootfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"

"github.com/Microsoft/hcsshim/internal/layers"
"github.com/containerd/containerd/api/types"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/v2/api/types"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/mount"
)

// validateRootfsAndLayers checks to ensure we have appropriate information
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"unsafe"

"github.com/Microsoft/go-winio"
task "github.com/containerd/containerd/api/runtime/task/v2"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/ttrpc"
typeurl "github.com/containerd/typeurl/v2"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"sync/atomic"
"time"

task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"go.opencensus.io/trace"
"google.golang.org/protobuf/types/known/emptypb"

Expand Down
8 changes: 4 additions & 4 deletions cmd/containerd-shim-runhcs-v1/service_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"os"
"path/filepath"

task "github.com/containerd/containerd/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/api/types/task"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/protobuf"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
containerd_v1_types "github.com/containerd/containerd/v2/api/types/task"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/protobuf"
typeurl "github.com/containerd/typeurl/v2"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options"
"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/protobuf"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/protobuf"
typeurl "github.com/containerd/typeurl/v2"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
"github.com/Microsoft/hcsshim/internal/hcsoci"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/protobuf"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/protobuf"
typeurl "github.com/containerd/typeurl/v2"
"github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/service_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
task "github.com/containerd/containerd/api/runtime/task/v2"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/pkg/errors"
)

Expand Down
7 changes: 2 additions & 5 deletions cmd/containerd-shim-runhcs-v1/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/Microsoft/go-winio"
"github.com/Microsoft/hcsshim/internal/oci"
"github.com/Microsoft/hcsshim/pkg/annotations"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/runtime/v2/shim"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/runtime/v2/shim"
"github.com/containerd/ttrpc"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -171,9 +171,6 @@ The start command can either start a new shim or return an address to an existin
if err := shim.WritePidFile(filepath.Join(cwd, "shim.pid"), pid); err != nil {
return err
}
if err := shim.WriteAddress(filepath.Join(cwd, "address"), address); err != nil {
return err
}

// Write the address new or existing to stdout
if _, err := fmt.Fprint(os.Stdout, address); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/Microsoft/hcsshim/internal/hcs"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/containerd-shim-runhcs-v1/task_hcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"sync"
"time"

eventstypes "github.com/containerd/containerd/api/events"
"github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/api/types"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
eventstypes "github.com/containerd/containerd/v2/api/events"
"github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/api/types"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/runtime"
"github.com/containerd/typeurl/v2"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd-shim-runhcs-v1/task_hcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

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

func setupTestHcsTask(t *testing.T) (*hcsTask, *testShimExec, *testShimExec) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/containerd-shim-runhcs-v1/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/pkg/ctrdtaskapi"
v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
typeurl "github.com/containerd/typeurl/v2"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
Expand Down
8 changes: 4 additions & 4 deletions cmd/containerd-shim-runhcs-v1/task_wcow_podsandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/Microsoft/hcsshim/internal/oc"
"github.com/Microsoft/hcsshim/internal/shimdiag"
"github.com/Microsoft/hcsshim/internal/uvm"
eventstypes "github.com/containerd/containerd/api/events"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime"
eventstypes "github.com/containerd/containerd/v2/api/events"
task "github.com/containerd/containerd/v2/api/runtime/task/v2"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/runtime"
typeurl "github.com/containerd/typeurl/v2"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ncproxy/ncproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/Microsoft/go-winio"
"github.com/containerd/containerd/protobuf"
"github.com/containerd/containerd/v2/protobuf"
"github.com/containerd/ttrpc"
typeurl "github.com/containerd/typeurl/v2"
"github.com/pkg/errors"
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/containerd/cgroups/v3 v3.0.2
github.com/containerd/console v1.0.3
github.com/containerd/containerd v1.7.0
github.com/containerd/go-runc v1.0.0
github.com/containerd/containerd/v2 v2.0.0-20231102165049-6cd0e8e40558
github.com/containerd/go-runc v1.1.0
github.com/containerd/protobuild v0.3.0
github.com/containerd/ttrpc v1.2.2
github.com/containerd/typeurl/v2 v2.1.1
Expand All @@ -22,7 +22,7 @@ require (
github.com/mattn/go-shellwords v1.0.12
github.com/open-policy-agent/opa v0.42.2
github.com/opencontainers/runc v1.1.8
github.com/opencontainers/runtime-spec v1.1.0
github.com/opencontainers/runtime-spec v1.1.1-0.20230823135140-4fec88fd00a4
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.3
Expand All @@ -34,7 +34,7 @@ require (
go.uber.org/mock v0.3.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.13.0
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.58.3
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.31.0
)
Expand All @@ -43,8 +43,10 @@ require (
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/agnivade/levenshtein v1.0.1 // indirect
github.com/akavel/rsrc v0.10.2 // indirect
github.com/containerd/continuity v0.4.1 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/plugin v0.0.0-20231101173250-7ec69893e1e7 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
Expand All @@ -54,7 +56,6 @@ require (
github.com/docker/docker v23.0.5+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
Expand All @@ -64,7 +65,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
Expand All @@ -76,7 +77,7 @@ require (
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
Expand All @@ -87,11 +88,10 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.1.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
golang.org/x/tools v0.11.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading
Loading