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: github.com/containerd/containerd v1.7.0-rc.2 #44530

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion builder/builder-next/adapters/containerimage/pull.go
Expand Up @@ -18,7 +18,7 @@ import (
ctdreference "github.com/containerd/containerd/reference"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/containerd/containerd/remotes/docker/schema1"
"github.com/containerd/containerd/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/containerd/containerd/remotes/docker/schema1" is deprecated: use images formatted in Docker Image Manifest v2, Schema 2, or OCI Image Spec v1.
distreference "github.com/docker/distribution/reference"
dimages "github.com/docker/docker/daemon/images"
"github.com/docker/docker/distribution/metadata"
Expand Down
11 changes: 9 additions & 2 deletions daemon/runtime_unix_test.go
Expand Up @@ -10,6 +10,8 @@ import (

"github.com/containerd/containerd/plugin"
v2runcoptions "github.com/containerd/containerd/runtime/v2/runc/options"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/proto"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

Expand Down Expand Up @@ -141,8 +143,13 @@ func TestGetRuntime(t *testing.T) {
stockRuntime, ok := d.configStore.Runtimes[config.StockRuntimeName]
assert.Assert(t, ok, "stock runtime could not be found (test needs to be updated)")

configdOpts := *stockRuntime.ShimConfig.Opts.(*v2runcoptions.Options)
configdOpts := proto.Clone(stockRuntime.ShimConfig.Opts.(*v2runcoptions.Options)).(*v2runcoptions.Options)
configdOpts.BinaryName = configuredRuntime.Path
wantConfigdRuntime := configuredRuntime
wantConfigdRuntime.ShimConfig = &types.ShimConfig{
Binary: stockRuntime.ShimConfig.Binary,
Opts: configdOpts,
}

for _, tt := range []struct {
name, runtime string
Expand Down Expand Up @@ -227,7 +234,7 @@ func TestGetRuntime(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
gotShim, gotOpts, err := d.getRuntime(tt.runtime)
assert.Check(t, is.Equal(gotShim, tt.wantShim))
assert.Check(t, is.DeepEqual(gotOpts, tt.wantOpts))
assert.Check(t, is.DeepEqual(gotOpts, tt.wantOpts, cmpopts.IgnoreUnexported(v2runcoptions.Options{})))
if tt.wantShim != "" {
assert.Check(t, err)
} else {
Expand Down
16 changes: 9 additions & 7 deletions libcontainerd/remote/client.go
Expand Up @@ -28,12 +28,14 @@ import (
"github.com/docker/docker/libcontainerd/queue"
libcontainerdtypes "github.com/docker/docker/libcontainerd/types"
"github.com/docker/docker/pkg/ioutils"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

// DockerContainerBundlePath is the label key pointing to the container's bundle path
Expand Down Expand Up @@ -159,7 +161,7 @@ func (c *container) Start(ctx context.Context, checkpointDir string, withStdin b
// remove the checkpoint when we're done
defer func() {
if checkpoint != nil {
err := c.client.client.ContentStore().Delete(ctx, checkpoint.Digest)
err := c.client.client.ContentStore().Delete(ctx, digest.Digest(checkpoint.Digest))
if err != nil {
c.client.logger.WithError(err).WithFields(logrus.Fields{
"ref": checkpointDir,
Expand Down Expand Up @@ -201,10 +203,10 @@ func (c *container) Start(ctx context.Context, checkpointDir string, withStdin b
if runtime.GOOS != "windows" {
taskOpts = append(taskOpts, func(_ context.Context, _ *containerd.Client, info *containerd.TaskInfo) error {
if c.v2runcoptions != nil {
opts := *c.v2runcoptions
opts := proto.Clone(c.v2runcoptions).(*v2runcoptions.Options)
opts.IoUid = uint32(uid)
opts.IoGid = uint32(gid)
info.Options = &opts
info.Options = opts
}
return nil
})
Expand Down Expand Up @@ -333,7 +335,7 @@ func (t *task) Stats(ctx context.Context) (*libcontainerdtypes.Stats, error) {
if err != nil {
return nil, err
}
return libcontainerdtypes.InterfaceToStats(m.Timestamp, v), nil
return libcontainerdtypes.InterfaceToStats(m.Timestamp.AsTime(), v), nil
}

func (t *task) Summary(ctx context.Context) ([]libcontainerdtypes.Summary, error) {
Expand Down Expand Up @@ -652,7 +654,7 @@ func (c *client) processEventStream(ctx context.Context, ns string) {
ProcessID: t.ID,
Pid: t.Pid,
ExitCode: t.ExitStatus,
ExitedAt: t.ExitedAt,
ExitedAt: t.ExitedAt.AsTime(),
}
case *apievents.TaskOOM:
et = libcontainerdtypes.EventOOM
Expand Down Expand Up @@ -720,8 +722,8 @@ func (c *client) writeContent(ctx context.Context, mediaType, ref string, r io.R
}
return &types.Descriptor{
MediaType: mediaType,
Digest: writer.Digest(),
Size_: size,
Digest: writer.Digest().Encoded(),
Size: size,
}, nil
}

Expand Down
97 changes: 62 additions & 35 deletions vendor.mod
Expand Up @@ -7,14 +7,14 @@ module github.com/docker/docker
go 1.18

require (
cloud.google.com/go/compute v1.7.0
cloud.google.com/go/logging v1.4.2
cloud.google.com/go/compute/metadata v0.2.3
cloud.google.com/go/logging v1.7.0
code.cloudfoundry.org/clock v1.0.0
github.com/AdaLogics/go-fuzz-headers v0.0.0-20221118232415-3345c89a7c72
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1
github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0
github.com/Microsoft/go-winio v0.5.2
github.com/Microsoft/hcsshim v0.9.7
github.com/Microsoft/go-winio v0.6.0
github.com/Microsoft/hcsshim v0.10.0-rc.7
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91
github.com/aws/aws-sdk-go-v2 v1.16.13
github.com/aws/aws-sdk-go-v2/config v1.17.4
Expand All @@ -25,7 +25,7 @@ require (
github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5
github.com/containerd/cgroups/v3 v3.0.1
github.com/containerd/containerd v1.6.19
github.com/containerd/containerd v1.7.0
github.com/containerd/continuity v0.3.0
github.com/containerd/fifo v1.1.0
github.com/containerd/typeurl/v2 v2.1.0
Expand Down Expand Up @@ -70,7 +70,7 @@ require (
github.com/moby/term v0.0.0-20221120202655-abb19827d345
github.com/morikuni/aec v1.0.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
github.com/opencontainers/runc v1.1.4
github.com/opencontainers/runtime-spec v1.1.0-rc.1
github.com/opencontainers/selinux v1.11.0
Expand All @@ -92,14 +92,18 @@ require (
golang.org/x/sys v0.6.0
golang.org/x/text v0.7.0
golang.org/x/time v0.3.0
google.golang.org/genproto v0.0.0-20220706185917-7780775163c4
google.golang.org/grpc v1.50.1
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
gotest.tools/v3 v3.4.0
resenje.org/singleflight v0.3.0
)

require (
cloud.google.com/go v0.102.1 // indirect
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/longrunning v0.4.1 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
Expand All @@ -111,19 +115,19 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.16 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/container-storage-interface/spec v1.5.0 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/go-cni v1.1.6 // indirect
github.com/containerd/go-cni v1.1.9 // indirect
github.com/containerd/go-runc v1.0.0 // indirect
github.com/containerd/nydus-snapshotter v0.3.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.13.0 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/containerd/ttrpc v1.2.1 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/containernetworking/cni v1.1.1 // indirect
github.com/containernetworking/cni v1.1.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
Expand All @@ -139,8 +143,8 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/certificate-transparency-go v1.1.4 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
Expand Down Expand Up @@ -170,27 +174,50 @@ require (
go.etcd.io/etcd/pkg/v3 v3.5.6 // indirect
go.etcd.io/etcd/raft/v3 v3.5.6 // indirect
go.etcd.io/etcd/server/v3 v3.5.6 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect
go.opentelemetry.io/otel v1.4.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect
go.opentelemetry.io/otel/metric v0.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.4.1 // indirect
go.opentelemetry.io/otel/trace v1.4.1 // indirect
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/sdk v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/otel/trace v1.14.0 // indirect; indirect // replaced: see replace section for version used
go.opentelemetry.io/proto/otlp v0.19.0 // indirect; indirect // replaced: see replace section for version used
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
google.golang.org/api v0.93.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/tools v0.5.0 // indirect
google.golang.org/api v0.110.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
)

replace (
// pinning to older version to fix compatibility with BuildKit v0.11;
// - https://github.com/moby/buildkit/blob/v0.11.4/go.mod#L71-L81
// - https://github.com/moby/buildkit/blob/v0.11.4/go.mod#L148-L151
// see https://github.com/moby/moby/pull/44530#issuecomment-1460561806
// FIXME(thaJeztah): remove once we update to BuildKit v0.12.x
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0
//go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace => go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0
//go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0
//go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.4.1
//go.opentelemetry.io/otel/exporters/jaeger => go.opentelemetry.io/otel/exporters/jaeger v1.4.1
go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1
//go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1
go.opentelemetry.io/otel/internal/metric => go.opentelemetry.io/otel/internal/metric v0.27.0
go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.27.0
//go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.4.1
//go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.4.1
go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.12.0
)