Skip to content

Commit a9e8e39

Browse files
authored
Merge pull request moby#3814 from changweige/update-nydus
nydus: update nydus-snapshotter dependency to v0.8.0
2 parents fec5a04 + eb6b0a5 commit a9e8e39

File tree

258 files changed

+21924
-3484
lines changed

Some content is hidden

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

258 files changed

+21924
-3484
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARG CNI_VERSION=v1.2.0
1010
ARG STARGZ_SNAPSHOTTER_VERSION=v0.14.3
1111
ARG NERDCTL_VERSION=v1.3.0
1212
ARG DNSNAME_VERSION=v1.3.1
13-
ARG NYDUS_VERSION=v2.1.0
13+
ARG NYDUS_VERSION=v2.1.6
1414
ARG MINIO_VERSION=RELEASE.2022-05-03T20-36-08Z
1515
ARG MINIO_MC_VERSION=RELEASE.2022-05-04T06-07-55Z
1616
ARG AZURITE_VERSION=3.18.0

cache/compression_nydus.go

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package cache
66
import (
77
"compress/gzip"
88
"context"
9-
"encoding/json"
109
"io"
1110

1211
"github.com/containerd/containerd/content"
@@ -18,13 +17,13 @@ import (
1817
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
1918
"github.com/pkg/errors"
2019

21-
nydusify "github.com/containerd/nydus-snapshotter/pkg/converter"
20+
"github.com/containerd/nydus-snapshotter/pkg/converter"
2221
)
2322

2423
func init() {
2524
additionalAnnotations = append(
2625
additionalAnnotations,
27-
nydusify.LayerAnnotationNydusBlob, nydusify.LayerAnnotationNydusBootstrap, nydusify.LayerAnnotationNydusBlobIDs,
26+
converter.LayerAnnotationNydusBlob, converter.LayerAnnotationNydusBootstrap,
2827
)
2928
}
3029

@@ -58,7 +57,7 @@ func MergeNydus(ctx context.Context, ref ImmutableRef, comp compression.Config,
5857

5958
// Extracts nydus bootstrap from nydus format for each layer.
6059
var cm *cacheManager
61-
layers := []nydusify.Layer{}
60+
layers := []converter.Layer{}
6261
blobIDs := []string{}
6362
for _, ref := range refs {
6463
blobDesc, err := getBlobWithCompressionWithRetry(ctx, ref, comp, s)
@@ -74,7 +73,7 @@ func MergeNydus(ctx context.Context, ref ImmutableRef, comp compression.Config,
7473
cm = ref.cm
7574
}
7675
blobIDs = append(blobIDs, blobDesc.Digest.Hex())
77-
layers = append(layers, nydusify.Layer{
76+
layers = append(layers, converter.Layer{
7877
Digest: blobDesc.Digest,
7978
ReaderAt: ra,
8079
})
@@ -84,7 +83,7 @@ func MergeNydus(ctx context.Context, ref ImmutableRef, comp compression.Config,
8483
pr, pw := io.Pipe()
8584
go func() {
8685
defer pw.Close()
87-
if _, err := nydusify.Merge(ctx, layers, pw, nydusify.MergeOption{
86+
if _, err := converter.Merge(ctx, layers, pw, converter.MergeOption{
8887
WithTar: true,
8988
}); err != nil {
9089
pw.CloseWithError(errors.Wrapf(err, "merge nydus bootstrap"))
@@ -125,21 +124,14 @@ func MergeNydus(ctx context.Context, ref ImmutableRef, comp compression.Config,
125124
return nil, errors.Wrap(err, "get info from content store")
126125
}
127126

128-
blobIDsBytes, err := json.Marshal(blobIDs)
129-
if err != nil {
130-
return nil, errors.Wrap(err, "marshal blob ids")
131-
}
132-
133127
desc := ocispecs.Descriptor{
134128
Digest: compressedDgst,
135129
Size: info.Size,
136130
MediaType: ocispecs.MediaTypeImageLayerGzip,
137131
Annotations: map[string]string{
138132
containerdUncompressed: uncompressedDgst.Digest().String(),
139133
// Use this annotation to identify nydus bootstrap layer.
140-
nydusify.LayerAnnotationNydusBootstrap: "true",
141-
// Track all blob digests for nydus snapshotter.
142-
nydusify.LayerAnnotationNydusBlobIDs: string(blobIDsBytes),
134+
converter.LayerAnnotationNydusBootstrap: "true",
143135
},
144136
}
145137

docs/nydus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ go build -tags=nydus -o ./bin/buildkitd ./cmd/buildkitd
1616

1717
### Building Nydus with BuildKit
1818

19-
Download `nydus-image` binary from [nydus release page](https://github.com/dragonflyoss/image-service/releases) (require v2.1.0 or higher), then put the `nydus-image` binary path into $PATH or specifying it on `NYDUS_BUILDER` environment variable for buildkitd:
19+
Download `nydus-image` binary from [nydus release page](https://github.com/dragonflyoss/image-service/releases) (require v2.1.6 or higher), then put the `nydus-image` binary path into $PATH or specifying it on `NYDUS_BUILDER` environment variable for buildkitd:
2020

2121
```
2222
env NYDUS_BUILDER=/path/to/nydus-image buildkitd ...

go.mod

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ require (
99
github.com/Microsoft/hcsshim v0.10.0-rc.7
1010
github.com/agext/levenshtein v1.2.3
1111
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
12-
github.com/aws/aws-sdk-go-v2/config v1.15.5
13-
github.com/aws/aws-sdk-go-v2/credentials v1.12.0
14-
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.10
15-
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.9
16-
github.com/aws/smithy-go v1.11.2
12+
github.com/aws/aws-sdk-go-v2/config v1.18.16
13+
github.com/aws/aws-sdk-go-v2/credentials v1.13.16
14+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.56
15+
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.6
16+
github.com/aws/smithy-go v1.13.5
1717
github.com/containerd/console v1.0.3
1818
github.com/containerd/containerd v1.7.0
1919
github.com/containerd/continuity v0.3.0
2020
github.com/containerd/fuse-overlayfs-snapshotter v1.0.2
2121
github.com/containerd/go-cni v1.1.9
2222
github.com/containerd/go-runc v1.0.1-0.20230316182144-f5d58d02d6c8
23-
github.com/containerd/nydus-snapshotter v0.3.1
23+
github.com/containerd/nydus-snapshotter v0.8.0
2424
github.com/containerd/stargz-snapshotter v0.14.3
2525
github.com/containerd/stargz-snapshotter/estargz v0.14.3
2626
github.com/containerd/typeurl/v2 v2.1.0
@@ -33,7 +33,7 @@ require (
3333
github.com/gofrs/flock v0.8.1
3434
github.com/gogo/googleapis v1.4.1
3535
github.com/gogo/protobuf v1.3.2
36-
github.com/golang/protobuf v1.5.2
36+
github.com/golang/protobuf v1.5.3
3737
github.com/google/go-cmp v0.5.9
3838
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
3939
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
@@ -86,7 +86,7 @@ require (
8686
golang.org/x/time v0.3.0
8787
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
8888
google.golang.org/grpc v1.53.0
89-
google.golang.org/protobuf v1.28.1
89+
google.golang.org/protobuf v1.30.0
9090
kernel.org/pub/linux/libs/security/libcap/cap v1.2.67
9191
)
9292

@@ -96,19 +96,20 @@ require (
9696
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect
9797
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
9898
github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 // indirect
99-
github.com/aws/aws-sdk-go-v2 v1.16.3 // indirect
100-
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
101-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.4 // indirect
102-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.10 // indirect
103-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.4 // indirect
104-
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.11 // indirect
105-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.1 // indirect
106-
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 // indirect
107-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.5 // indirect
108-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.4 // indirect
109-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.4 // indirect
110-
github.com/aws/aws-sdk-go-v2/service/sso v1.11.4 // indirect
111-
github.com/aws/aws-sdk-go-v2/service/sts v1.16.4 // indirect
99+
github.com/aws/aws-sdk-go-v2 v1.17.6 // indirect
100+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
101+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24 // indirect
102+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 // indirect
103+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 // indirect
104+
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31 // indirect
105+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.22 // indirect
106+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
107+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.25 // indirect
108+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 // indirect
109+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.24 // indirect
110+
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 // indirect
111+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 // indirect
112+
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 // indirect
112113
github.com/beorn7/perks v1.0.1 // indirect
113114
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
114115
github.com/cespare/xxhash/v2 v2.2.0 // indirect
@@ -143,18 +144,18 @@ require (
143144
github.com/pmezard/go-difflib v1.0.0 // indirect
144145
github.com/prometheus/client_golang v1.14.0 // indirect
145146
github.com/prometheus/client_model v0.3.0 // indirect
146-
github.com/prometheus/common v0.37.0 // indirect
147-
github.com/prometheus/procfs v0.8.0 // indirect
147+
github.com/prometheus/common v0.42.0 // indirect
148+
github.com/prometheus/procfs v0.9.0 // indirect
148149
github.com/russross/blackfriday/v2 v2.1.0 // indirect
149150
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
150151
github.com/shibumi/go-pathspec v1.3.0 // indirect
151152
github.com/vbatts/tar-split v0.11.2 // indirect
152153
go.opencensus.io v0.24.0 // indirect
153154
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
154155
go.opentelemetry.io/otel/metric v0.37.0 // indirect
155-
golang.org/x/mod v0.8.0 // indirect
156+
golang.org/x/mod v0.9.0 // indirect
156157
golang.org/x/text v0.8.0 // indirect
157-
golang.org/x/tools v0.6.0 // indirect
158+
golang.org/x/tools v0.7.0 // indirect
158159
gopkg.in/yaml.v3 v3.0.1 // indirect
159160
kernel.org/pub/linux/libs/security/libcap/psx v1.2.67 // indirect
160161
)

0 commit comments

Comments
 (0)