Skip to content

Commit 6d4901c

Browse files
authored
Merge pull request moby#3847 from thaJeztah/image_spec_1.1.0-rc3
2 parents 1e725ca + 647a2b5 commit 6d4901c

File tree

15 files changed

+67
-91
lines changed

15 files changed

+67
-91
lines changed

cache/manager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ func TestSetBlob(t *testing.T) {
849849

850850
clean(context.TODO())
851851

852-
//snap.SetBlob()
852+
// snap.SetBlob()
853853
}
854854

855855
func TestPrune(t *testing.T) {
@@ -1926,7 +1926,7 @@ func TestNondistributableBlobs(t *testing.T) {
19261926
require.NoError(t, err)
19271927

19281928
// Pretend like this is non-distributable
1929-
desc.MediaType = ocispecs.MediaTypeImageLayerNonDistributable
1929+
desc.MediaType = ocispecs.MediaTypeImageLayerNonDistributable //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
19301930
desc.URLs = []string{"https://buildkit.moby.dev/foo"}
19311931

19321932
cw, err := contentBuffer.Writer(ctx)

cache/refs.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,11 @@ func layerToDistributable(mt string) string {
614614
}
615615

616616
switch mt {
617-
case ocispecs.MediaTypeImageLayerNonDistributable:
617+
case ocispecs.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
618618
return ocispecs.MediaTypeImageLayer
619-
case ocispecs.MediaTypeImageLayerNonDistributableGzip:
619+
case ocispecs.MediaTypeImageLayerNonDistributableGzip: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
620620
return ocispecs.MediaTypeImageLayerGzip
621-
case ocispecs.MediaTypeImageLayerNonDistributableZstd:
621+
case ocispecs.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
622622
return ocispecs.MediaTypeImageLayerZstd
623623
case images.MediaTypeDockerSchema2LayerForeign:
624624
return images.MediaTypeDockerSchema2Layer
@@ -632,11 +632,11 @@ func layerToDistributable(mt string) string {
632632
func layerToNonDistributable(mt string) string {
633633
switch mt {
634634
case ocispecs.MediaTypeImageLayer:
635-
return ocispecs.MediaTypeImageLayerNonDistributable
635+
return ocispecs.MediaTypeImageLayerNonDistributable //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
636636
case ocispecs.MediaTypeImageLayerGzip:
637-
return ocispecs.MediaTypeImageLayerNonDistributableGzip
637+
return ocispecs.MediaTypeImageLayerNonDistributableGzip //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
638638
case ocispecs.MediaTypeImageLayerZstd:
639-
return ocispecs.MediaTypeImageLayerNonDistributableZstd
639+
return ocispecs.MediaTypeImageLayerNonDistributableZstd //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
640640
case images.MediaTypeDockerSchema2Layer:
641641
return images.MediaTypeDockerSchema2LayerForeign
642642
case images.MediaTypeDockerSchema2LayerForeignGzip:

exporter/containerimage/image/docker_image.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ type ImageConfig struct {
3333
ocispecs.ImageConfig
3434

3535
Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
36-
ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (Windows specific)
3736

3837
// NetworkDisabled bool `json:",omitempty"` // Is network disabled
3938
// MacAddress string `json:",omitempty"` // Mac Address of the container

frontend/dockerfile/dockerfile2llb/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ func dispatchCmd(d *dispatchState, c *instructions.CmdCommand) error {
12611261
args = withShell(d.image, args)
12621262
}
12631263
d.image.Config.Cmd = args
1264-
d.image.Config.ArgsEscaped = true
1264+
d.image.Config.ArgsEscaped = true //nolint:staticcheck // ignore SA1019: field is deprecated in OCI Image spec, but used for backward-compatibility with Docker image spec.
12651265
d.cmdSet = true
12661266
return commitToHistory(&d.image, fmt.Sprintf("CMD %q", args), false, nil, d.epoch)
12671267
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ require (
4949
github.com/moby/sys/signal v0.7.0
5050
github.com/morikuni/aec v1.0.0
5151
github.com/opencontainers/go-digest v1.0.0
52-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
52+
github.com/opencontainers/image-spec v1.1.0-rc3
5353
github.com/opencontainers/runc v1.1.6
5454
github.com/opencontainers/runtime-spec v1.1.0-rc.1
5555
github.com/opencontainers/selinux v1.11.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
985985
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
986986
github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
987987
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
988-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
989-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
988+
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
989+
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
990990
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
991991
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
992992
github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=

util/compression/compression.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ func parse(t string) (Type, error) {
100100

101101
func fromMediaType(mediaType string) (Type, error) {
102102
switch toOCILayerType[mediaType] {
103-
case ocispecs.MediaTypeImageLayer, ocispecs.MediaTypeImageLayerNonDistributable:
103+
case ocispecs.MediaTypeImageLayer, ocispecs.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
104104
return Uncompressed, nil
105-
case ocispecs.MediaTypeImageLayerGzip, ocispecs.MediaTypeImageLayerNonDistributableGzip:
105+
case ocispecs.MediaTypeImageLayerGzip, ocispecs.MediaTypeImageLayerNonDistributableGzip: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
106106
return Gzip, nil
107-
case mediaTypeImageLayerZstd, ocispecs.MediaTypeImageLayerNonDistributableZstd:
107+
case mediaTypeImageLayerZstd, ocispecs.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
108108
return Zstd, nil
109109
default:
110110
return nil, errors.Errorf("unsupported media type %s", mediaType)
@@ -191,22 +191,22 @@ var toDockerLayerType = map[string]string{
191191
images.MediaTypeDockerSchema2LayerGzip: images.MediaTypeDockerSchema2LayerGzip,
192192
images.MediaTypeDockerSchema2LayerForeign: images.MediaTypeDockerSchema2LayerForeign,
193193
images.MediaTypeDockerSchema2LayerForeignGzip: images.MediaTypeDockerSchema2LayerForeignGzip,
194-
ocispecs.MediaTypeImageLayerNonDistributable: images.MediaTypeDockerSchema2LayerForeign,
195-
ocispecs.MediaTypeImageLayerNonDistributableGzip: images.MediaTypeDockerSchema2LayerForeignGzip,
194+
ocispecs.MediaTypeImageLayerNonDistributable: images.MediaTypeDockerSchema2LayerForeign, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
195+
ocispecs.MediaTypeImageLayerNonDistributableGzip: images.MediaTypeDockerSchema2LayerForeignGzip, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
196196
mediaTypeImageLayerZstd: mediaTypeDockerSchema2LayerZstd,
197197
mediaTypeDockerSchema2LayerZstd: mediaTypeDockerSchema2LayerZstd,
198198
}
199199

200200
var toOCILayerType = map[string]string{
201201
ocispecs.MediaTypeImageLayer: ocispecs.MediaTypeImageLayer,
202-
ocispecs.MediaTypeImageLayerNonDistributable: ocispecs.MediaTypeImageLayerNonDistributable,
203-
ocispecs.MediaTypeImageLayerNonDistributableGzip: ocispecs.MediaTypeImageLayerNonDistributableGzip,
204-
ocispecs.MediaTypeImageLayerNonDistributableZstd: ocispecs.MediaTypeImageLayerNonDistributableZstd,
202+
ocispecs.MediaTypeImageLayerNonDistributable: ocispecs.MediaTypeImageLayerNonDistributable, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
203+
ocispecs.MediaTypeImageLayerNonDistributableGzip: ocispecs.MediaTypeImageLayerNonDistributableGzip, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
204+
ocispecs.MediaTypeImageLayerNonDistributableZstd: ocispecs.MediaTypeImageLayerNonDistributableZstd, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
205205
images.MediaTypeDockerSchema2Layer: ocispecs.MediaTypeImageLayer,
206206
ocispecs.MediaTypeImageLayerGzip: ocispecs.MediaTypeImageLayerGzip,
207207
images.MediaTypeDockerSchema2LayerGzip: ocispecs.MediaTypeImageLayerGzip,
208-
images.MediaTypeDockerSchema2LayerForeign: ocispecs.MediaTypeImageLayerNonDistributable,
209-
images.MediaTypeDockerSchema2LayerForeignGzip: ocispecs.MediaTypeImageLayerNonDistributableGzip,
208+
images.MediaTypeDockerSchema2LayerForeign: ocispecs.MediaTypeImageLayerNonDistributable, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
209+
images.MediaTypeDockerSchema2LayerForeignGzip: ocispecs.MediaTypeImageLayerNonDistributableGzip, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
210210
mediaTypeImageLayerZstd: mediaTypeImageLayerZstd,
211211
mediaTypeDockerSchema2LayerZstd: mediaTypeImageLayerZstd,
212212
}

util/pull/pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ func filterLayerBlobs(metadata map[digest.Digest]ocispecs.Descriptor, mu sync.Lo
233233
switch desc.MediaType {
234234
case
235235
ocispecs.MediaTypeImageLayer,
236-
ocispecs.MediaTypeImageLayerNonDistributable,
236+
ocispecs.MediaTypeImageLayerNonDistributable, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
237237
images.MediaTypeDockerSchema2Layer,
238238
images.MediaTypeDockerSchema2LayerForeign,
239239
ocispecs.MediaTypeImageLayerGzip,
240240
images.MediaTypeDockerSchema2LayerGzip,
241-
ocispecs.MediaTypeImageLayerNonDistributableGzip,
241+
ocispecs.MediaTypeImageLayerNonDistributableGzip, //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
242242
images.MediaTypeDockerSchema2LayerForeignGzip,
243243
ocispecs.MediaTypeImageLayerZstd,
244-
ocispecs.MediaTypeImageLayerNonDistributableZstd:
244+
ocispecs.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // ignore SA1019: Non-distributable layers are deprecated, and not recommended for future use.
245245
return nil, images.ErrSkipDesc
246246
default:
247247
if metadata != nil {

vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)