Skip to content

Commit

Permalink
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 4347fc8)
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
AkihiroSuda authored and dmcgowan committed May 7, 2024
1 parent 8cf85ba commit 89b975d
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 81 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/moby/sys/symlink v0.2.0
github.com/moby/sys/user v0.1.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
github.com/opencontainers/image-spec v1.1.0-rc3
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/opencontainers/selinux v1.10.1
github.com/pelletier/go-toml v1.9.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,8 @@ github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
Expand Down
4 changes: 2 additions & 2 deletions images/converter/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ func ConvertDockerMediaTypeToOCI(mt string) string {
case images.MediaTypeDockerSchema2LayerGzip:
return ocispec.MediaTypeImageLayerGzip
case images.MediaTypeDockerSchema2LayerForeignGzip:
return ocispec.MediaTypeImageLayerNonDistributableGzip
return ocispec.MediaTypeImageLayerNonDistributableGzip //nolint:staticcheck // deprecated
case images.MediaTypeDockerSchema2Layer:
return ocispec.MediaTypeImageLayer
case images.MediaTypeDockerSchema2LayerForeign:
return ocispec.MediaTypeImageLayerNonDistributable
return ocispec.MediaTypeImageLayerNonDistributable //nolint:staticcheck // deprecated
case images.MediaTypeDockerSchema2Config:
return ocispec.MediaTypeImageConfig
default:
Expand Down
6 changes: 3 additions & 3 deletions images/converter/uncompress/uncompress.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func IsUncompressedType(mt string) bool {
images.MediaTypeDockerSchema2Layer,
images.MediaTypeDockerSchema2LayerForeign,
ocispec.MediaTypeImageLayer,
ocispec.MediaTypeImageLayerNonDistributable:
ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
return true
default:
return false
Expand All @@ -114,8 +114,8 @@ func convertMediaType(mt string) string {
return images.MediaTypeDockerSchema2LayerForeign
case ocispec.MediaTypeImageLayerGzip, ocispec.MediaTypeImageLayerZstd:
return ocispec.MediaTypeImageLayer
case ocispec.MediaTypeImageLayerNonDistributableGzip, ocispec.MediaTypeImageLayerNonDistributableZstd:
return ocispec.MediaTypeImageLayerNonDistributable
case ocispec.MediaTypeImageLayerNonDistributableGzip, ocispec.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // deprecated
return ocispec.MediaTypeImageLayerNonDistributable //nolint:staticcheck // deprecated
default:
return mt
}
Expand Down
2 changes: 1 addition & 1 deletion images/diffid.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (
MediaTypeDockerSchema2Layer,
ocispec.MediaTypeImageLayer,
MediaTypeDockerSchema2LayerForeign,
ocispec.MediaTypeImageLayerNonDistributable:
ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
return desc.Digest, nil
}
info, err := cs.Info(ctx, desc.Digest)
Expand Down
2 changes: 1 addition & 1 deletion images/mediatypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func DiffCompression(ctx context.Context, mediaType string) (string, error) {
return "", nil
}
return "gzip", nil
case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable:
case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // Non-distributable layers are deprecated
if len(ext) > 0 {
switch ext[len(ext)-1] {
case "gzip":
Expand Down
2 changes: 1 addition & 1 deletion integration/client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/containerd/typeurl v1.0.2
github.com/gogo/protobuf v1.3.2
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
github.com/opencontainers/image-spec v1.1.0-rc3
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
Expand Down
8 changes: 5 additions & 3 deletions integration/client/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,11 @@ func createContent(size int64, seed int64) ([]byte, digest.Digest) {

func createConfig(osName, archName string) ([]byte, digest.Digest) {
image := ocispec.Image{
OS: osName,
Architecture: archName,
Author: "test",
Platform: ocispec.Platform{
OS: osName,
Architecture: archName,
},
Author: "test",
}
b, _ := json.Marshal(image)

Expand Down
1 change: 1 addition & 0 deletions oci/spec_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ func WithImageConfigArgs(image Image, args []string) SpecOpts {
return errors.New("no arguments specified")
}

//nolint:staticcheck // ArgsEscaped is deprecated
if config.ArgsEscaped && (len(config.Entrypoint) > 0 || cmdFromImage) {
s.Process.Args = nil
s.Process.CommandLine = cmd[0]
Expand Down
4 changes: 2 additions & 2 deletions pkg/cri/opts/spec_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func escapeAndCombineArgsWindows(args []string) string {
// If image.ArgsEscaped field is set, this function sets the process command line and if not, it sets the
// process args field
func WithProcessCommandLineOrArgsForWindows(config *runtime.ContainerConfig, image *imagespec.ImageConfig) oci.SpecOpts {
if image.ArgsEscaped {
if image.ArgsEscaped { //nolint:staticcheck // ArgsEscaped is deprecated
return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) {
// firstArgFromImg is a flag that is returned to indicate that the first arg in the slice comes from either the
// image Entrypoint or Cmd. If the first arg instead comes from the container config (e.g. overriding the image values),
Expand All @@ -273,7 +273,7 @@ func WithProcessCommandLineOrArgsForWindows(config *runtime.ContainerConfig, ima
}

var cmdLine string
if image.ArgsEscaped && firstArgFromImg {
if image.ArgsEscaped && firstArgFromImg { //nolint:staticcheck // ArgsEscaped is deprecated
cmdLine = args[0]
if len(args) > 1 {
cmdLine += " " + escapeAndCombineArgsWindows(args[1:])
Expand Down
1 change: 1 addition & 0 deletions remotes/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func TestContextCustomKeyPrefix(t *testing.T) {
})
}

//nolint:staticcheck // Non-distributable layers are deprecated
func TestSkipNonDistributableBlobs(t *testing.T) {
ctx := context.Background()

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

34 changes: 11 additions & 23 deletions vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ github.com/modern-go/reflect2
## explicit; go 1.13
github.com/opencontainers/go-digest
github.com/opencontainers/go-digest/digestset
# github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
## explicit; go 1.17
# github.com/opencontainers/image-spec v1.1.0-rc3
## explicit; go 1.18
github.com/opencontainers/image-spec/identity
github.com/opencontainers/image-spec/specs-go
github.com/opencontainers/image-spec/specs-go/v1
Expand Down

0 comments on commit 89b975d

Please sign in to comment.