Skip to content

Commit fd6dd69

Browse files
committed
vendor: github.com/containerd/containerd v1.7.6
The DeepEqual ignore required in the daemon tests is a bit ugly, but it works given the new protoc output. We also have to ignore lints related to schema1 deprecations; these do not apply as we must continue to support this schema version. Signed-off-by: Bjorn Neergaard <[email protected]>
1 parent 79a4cbb commit fd6dd69

508 files changed

Lines changed: 52036 additions & 64483 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

builder/builder-next/adapters/containerimage/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
ctdreference "github.com/containerd/containerd/reference"
2020
"github.com/containerd/containerd/remotes"
2121
"github.com/containerd/containerd/remotes/docker"
22-
"github.com/containerd/containerd/remotes/docker/schema1"
22+
"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.
2323
distreference "github.com/distribution/reference"
2424
dimages "github.com/docker/docker/daemon/images"
2525
"github.com/docker/docker/distribution/metadata"

daemon/containerd/image_pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (i *ImageService) PullImage(ctx context.Context, ref reference.Named, platf
115115

116116
// Allow pulling application/vnd.docker.distribution.manifest.v1+prettyjws images
117117
// by converting them to OCI manifests.
118-
opts = append(opts, containerd.WithSchema1Conversion)
118+
opts = append(opts, containerd.WithSchema1Conversion) //nolint:staticcheck // Ignore SA1019: containerd.WithSchema1Conversion is deprecated: use Schema 2 or OCI images.
119119

120120
img, err := i.client.Pull(ctx, ref.String(), opts...)
121121
if err != nil {

daemon/runtime_unix_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import (
1414
"github.com/docker/docker/api/types/system"
1515
"github.com/docker/docker/daemon/config"
1616
"github.com/docker/docker/errdefs"
17+
"github.com/google/go-cmp/cmp/cmpopts"
1718
"github.com/imdario/mergo"
19+
"google.golang.org/protobuf/proto"
1820
"gotest.tools/v3/assert"
1921
is "gotest.tools/v3/assert/cmp"
2022
)
@@ -242,11 +244,11 @@ func TestGetRuntime(t *testing.T) {
242244
assert.Assert(t, ok, "stock runtime could not be found (test needs to be updated)")
243245
stockRuntime.Features = nil
244246

245-
configdOpts := *stockRuntime.Opts.(*v2runcoptions.Options)
247+
configdOpts := proto.Clone(stockRuntime.Opts.(*v2runcoptions.Options)).(*v2runcoptions.Options)
246248
configdOpts.BinaryName = configuredRuntime.Path
247249
wantConfigdRuntime := &shimConfig{
248250
Shim: stockRuntime.Shim,
249-
Opts: &configdOpts,
251+
Opts: configdOpts,
250252
}
251253

252254
for _, tt := range []struct {
@@ -334,7 +336,10 @@ func TestGetRuntime(t *testing.T) {
334336
if tt.want != nil {
335337
assert.Check(t, err)
336338
got := &shimConfig{Shim: shim, Opts: opts}
337-
assert.Check(t, is.DeepEqual(got, tt.want))
339+
assert.Check(t, is.DeepEqual(got, tt.want,
340+
cmpopts.IgnoreUnexported(runtimeoptions_v1.Options{}),
341+
cmpopts.IgnoreUnexported(v2runcoptions.Options{}),
342+
))
338343
} else {
339344
assert.Check(t, is.Equal(shim, ""))
340345
assert.Check(t, is.Nil(opts))

libcontainerd/remote/client.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ import (
2222
cerrdefs "github.com/containerd/containerd/errdefs"
2323
"github.com/containerd/containerd/images"
2424
"github.com/containerd/containerd/log"
25+
"github.com/containerd/containerd/protobuf"
2526
v2runcoptions "github.com/containerd/containerd/runtime/v2/runc/options"
2627
"github.com/containerd/typeurl/v2"
2728
"github.com/docker/docker/errdefs"
2829
"github.com/docker/docker/libcontainerd/queue"
2930
libcontainerdtypes "github.com/docker/docker/libcontainerd/types"
3031
"github.com/docker/docker/pkg/ioutils"
3132
"github.com/hashicorp/go-multierror"
33+
"github.com/opencontainers/go-digest"
3234
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
3335
specs "github.com/opencontainers/runtime-spec/specs-go"
3436
"github.com/pkg/errors"
3537
"google.golang.org/grpc/codes"
3638
"google.golang.org/grpc/status"
39+
"google.golang.org/protobuf/proto"
3740
)
3841

3942
// DockerContainerBundlePath is the label key pointing to the container's bundle path
@@ -163,7 +166,7 @@ func (c *container) Start(ctx context.Context, checkpointDir string, withStdin b
163166
// remove the checkpoint when we're done
164167
defer func() {
165168
if checkpoint != nil {
166-
err := c.client.client.ContentStore().Delete(ctx, checkpoint.Digest)
169+
err := c.client.client.ContentStore().Delete(ctx, digest.Digest(checkpoint.Digest))
167170
if err != nil {
168171
c.client.logger.WithError(err).WithFields(log.Fields{
169172
"ref": checkpointDir,
@@ -205,10 +208,10 @@ func (c *container) Start(ctx context.Context, checkpointDir string, withStdin b
205208
if runtime.GOOS != "windows" {
206209
taskOpts = append(taskOpts, func(_ context.Context, _ *containerd.Client, info *containerd.TaskInfo) error {
207210
if c.v2runcoptions != nil {
208-
opts := *c.v2runcoptions
211+
opts := proto.Clone(c.v2runcoptions).(*v2runcoptions.Options)
209212
opts.IoUid = uint32(uid)
210213
opts.IoGid = uint32(gid)
211-
info.Options = &opts
214+
info.Options = opts
212215
}
213216
return nil
214217
})
@@ -342,7 +345,7 @@ func (t *task) Stats(ctx context.Context) (*libcontainerdtypes.Stats, error) {
342345
if err != nil {
343346
return nil, err
344347
}
345-
return libcontainerdtypes.InterfaceToStats(m.Timestamp, v), nil
348+
return libcontainerdtypes.InterfaceToStats(protobuf.FromTimestamp(m.Timestamp), v), nil
346349
}
347350

348351
func (t *task) Summary(ctx context.Context) ([]libcontainerdtypes.Summary, error) {
@@ -675,7 +678,7 @@ func (c *client) processEventStream(ctx context.Context, ns string) {
675678
ProcessID: t.ID,
676679
Pid: t.Pid,
677680
ExitCode: t.ExitStatus,
678-
ExitedAt: t.ExitedAt,
681+
ExitedAt: protobuf.FromTimestamp(t.ExitedAt),
679682
})
680683
case *apievents.TaskOOM:
681684
c.processEvent(ctx, libcontainerdtypes.EventOOM, libcontainerdtypes.EventInfo{
@@ -734,8 +737,8 @@ func (c *client) writeContent(ctx context.Context, mediaType, ref string, r io.R
734737
}
735738
return &types.Descriptor{
736739
MediaType: mediaType,
737-
Digest: writer.Digest(),
738-
Size_: size,
740+
Digest: writer.Digest().Encoded(),
741+
Size: size,
739742
}, nil
740743
}
741744

vendor.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/cloudflare/cfssl v1.6.4
2727
github.com/container-orchestrated-devices/container-device-interface v0.6.1
2828
github.com/containerd/cgroups/v3 v3.0.2
29-
github.com/containerd/containerd v1.6.24
29+
github.com/containerd/containerd v1.7.6
3030
github.com/containerd/continuity v0.4.2
3131
github.com/containerd/fifo v1.1.0
3232
github.com/containerd/typeurl/v2 v2.1.1
@@ -91,12 +91,12 @@ require (
9191
github.com/vishvananda/netlink v1.2.1-beta.2
9292
github.com/vishvananda/netns v0.0.4
9393
go.etcd.io/bbolt v1.3.7
94-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0
95-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0
96-
go.opentelemetry.io/otel v1.4.1
97-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1
98-
go.opentelemetry.io/otel/sdk v1.4.1
99-
go.opentelemetry.io/otel/trace v1.4.1
94+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0
95+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0
96+
go.opentelemetry.io/otel v1.14.0
97+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0
98+
go.opentelemetry.io/otel/sdk v1.14.0
99+
go.opentelemetry.io/otel/trace v1.14.0
100100
golang.org/x/mod v0.10.0
101101
golang.org/x/net v0.10.0
102102
golang.org/x/sync v0.3.0
@@ -105,6 +105,7 @@ require (
105105
golang.org/x/time v0.3.0
106106
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
107107
google.golang.org/grpc v1.56.2
108+
google.golang.org/protobuf v1.31.0
108109
gotest.tools/v3 v3.5.0
109110
resenje.org/singleflight v0.4.0
110111
)
@@ -113,6 +114,7 @@ require (
113114
cloud.google.com/go v0.110.0 // indirect
114115
cloud.google.com/go/compute v1.19.1 // indirect
115116
cloud.google.com/go/longrunning v0.4.1 // indirect
117+
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
116118
github.com/agext/levenshtein v1.2.3 // indirect
117119
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
118120
github.com/armon/go-metrics v0.4.1 // indirect
@@ -155,7 +157,7 @@ require (
155157
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
156158
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
157159
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
158-
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
160+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
159161
github.com/hashicorp/errwrap v1.1.0 // indirect
160162
github.com/hashicorp/go-msgpack v0.5.5 // indirect
161163
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
@@ -190,13 +192,12 @@ require (
190192
go.etcd.io/etcd/raft/v3 v3.5.6 // indirect
191193
go.etcd.io/etcd/server/v3 v3.5.6 // indirect
192194
go.opencensus.io v0.24.0 // indirect
193-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 // indirect
194-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect
195-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect
196-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 // indirect
197-
go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect
198-
go.opentelemetry.io/otel/metric v0.27.0 // indirect
199-
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
195+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.40.0 // indirect
196+
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
197+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
198+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect
199+
go.opentelemetry.io/otel/metric v0.37.0 // indirect
200+
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
200201
go.uber.org/atomic v1.9.0 // indirect
201202
go.uber.org/multierr v1.8.0 // indirect
202203
go.uber.org/zap v1.21.0 // indirect
@@ -205,7 +206,6 @@ require (
205206
golang.org/x/tools v0.8.0 // indirect
206207
google.golang.org/api v0.114.0 // indirect
207208
google.golang.org/appengine v1.6.7 // indirect
208-
google.golang.org/protobuf v1.31.0 // indirect
209209
gopkg.in/yaml.v2 v2.4.0 // indirect
210210
k8s.io/klog/v2 v2.90.1 // indirect
211211
sigs.k8s.io/yaml v1.3.0 // indirect

0 commit comments

Comments
 (0)