mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-20 15:31:14 -06:00
build(deps): bump oras.land/oras-go/v2 from 2.3.0 to 2.3.1 (#6337)
Bumps [oras.land/oras-go/v2](https://github.com/oras-project/oras-go) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/oras-project/oras-go/releases) - [Commits](https://github.com/oras-project/oras-go/compare/v2.3.0...v2.3.1) --- updated-dependencies: - dependency-name: oras.land/oras-go/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ require (
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.1.0-rc4
|
||||
github.com/opencontainers/image-spec v1.1.0-rc5
|
||||
github.com/peterh/liner v1.2.2
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
|
||||
@@ -43,7 +43,7 @@ require (
|
||||
google.golang.org/grpc v1.59.0
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
oras.land/oras-go/v2 v2.3.0
|
||||
oras.land/oras-go/v2 v2.3.1
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
@@ -87,7 +87,7 @@ require (
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
golang.org/x/sync v0.3.0 // indirect
|
||||
golang.org/x/sync v0.4.0 // indirect
|
||||
golang.org/x/sys v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||
|
||||
@@ -156,8 +156,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0=
|
||||
github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
|
||||
github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
|
||||
github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
|
||||
github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI=
|
||||
@@ -279,8 +279,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -363,7 +363,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
oras.land/oras-go/v2 v2.3.0 h1:lqX1aXdN+DAmDTKjiDyvq85cIaI4RkIKp/PghWlAGIU=
|
||||
oras.land/oras-go/v2 v2.3.0/go.mod h1:GeAwLuC4G/JpNwkd+bSZ6SkDMGaaYglt6YK2WvZP7uQ=
|
||||
oras.land/oras-go/v2 v2.3.1 h1:lUC6q8RkeRReANEERLfH86iwGn55lbSWP20egdFHVec=
|
||||
oras.land/oras-go/v2 v2.3.1/go.mod h1:5AQXVEu1X/FKp1F9DMOb5ZItZBOa0y5dha0yCm4NR9c=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import digest "github.com/opencontainers/go-digest"
|
||||
// when marshalled to JSON.
|
||||
type Descriptor struct {
|
||||
// MediaType is the media type of the object this schema refers to.
|
||||
MediaType string `json:"mediaType,omitempty"`
|
||||
MediaType string `json:"mediaType"`
|
||||
|
||||
// Digest is the digest of the targeted content.
|
||||
Digest digest.Digest `json:"digest"`
|
||||
|
||||
+5
-1
@@ -15,10 +15,14 @@
|
||||
package v1
|
||||
|
||||
const (
|
||||
// ImageLayoutFile is the file name of oci image layout file
|
||||
// ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout
|
||||
ImageLayoutFile = "oci-layout"
|
||||
// ImageLayoutVersion is the version of ImageLayout
|
||||
ImageLayoutVersion = "1.0.0"
|
||||
// ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout
|
||||
ImageIndexFile = "index.json"
|
||||
// ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout
|
||||
ImageBlobsDir = "blobs"
|
||||
)
|
||||
|
||||
// ImageLayout is the structure in the "oci-layout" file, found in the root
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ const (
|
||||
VersionPatch = 0
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = "-rc.4"
|
||||
VersionDev = "-rc.5"
|
||||
)
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
|
||||
Vendored
+4
-4
@@ -195,7 +195,7 @@ github.com/olekukonko/tablewriter
|
||||
# github.com/opencontainers/go-digest v1.0.0
|
||||
## explicit; go 1.13
|
||||
github.com/opencontainers/go-digest
|
||||
# github.com/opencontainers/image-spec v1.1.0-rc4
|
||||
# github.com/opencontainers/image-spec v1.1.0-rc5
|
||||
## explicit; go 1.18
|
||||
github.com/opencontainers/image-spec/specs-go
|
||||
github.com/opencontainers/image-spec/specs-go/v1
|
||||
@@ -340,7 +340,7 @@ golang.org/x/net/internal/timeseries
|
||||
golang.org/x/net/ipv4
|
||||
golang.org/x/net/ipv6
|
||||
golang.org/x/net/trace
|
||||
# golang.org/x/sync v0.3.0
|
||||
# golang.org/x/sync v0.4.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/sync/errgroup
|
||||
golang.org/x/sync/semaphore
|
||||
@@ -465,8 +465,8 @@ gopkg.in/yaml.v2
|
||||
# gopkg.in/yaml.v3 v3.0.1
|
||||
## explicit
|
||||
gopkg.in/yaml.v3
|
||||
# oras.land/oras-go/v2 v2.3.0
|
||||
## explicit; go 1.19
|
||||
# oras.land/oras-go/v2 v2.3.1
|
||||
## explicit; go 1.20
|
||||
oras.land/oras-go/v2
|
||||
oras.land/oras-go/v2/content
|
||||
oras.land/oras-go/v2/content/oci
|
||||
|
||||
+3
@@ -19,6 +19,9 @@ The ORAS Go library follows [Semantic Versioning](https://semver.org/), where br
|
||||
|
||||
The version `2` is actively developed in the [`main`](https://github.com/oras-project/oras-go/tree/main) branch with all new features.
|
||||
|
||||
> [!Note]
|
||||
> The `main` branch follows [Go's Security Policy](https://github.com/golang/go/security/policy) and supports the two latest versions of Go (currently `1.20` and `1.21`).
|
||||
|
||||
Examples for common use cases can be found below:
|
||||
|
||||
- [Copy examples](https://pkg.go.dev/oras.land/oras-go/v2#pkg-examples)
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Security Policy
|
||||
|
||||
Please follow the [security policy](https://oras.land/docs/community/reporting_security_concerns) to report a security vulnerability or concern.
|
||||
+2
-12
@@ -38,16 +38,6 @@ import (
|
||||
"oras.land/oras-go/v2/internal/resolver"
|
||||
)
|
||||
|
||||
// ociImageIndexFile is the file name of the index
|
||||
// from the OCI Image Layout Specification.
|
||||
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc4/image-layout.md#indexjson-file
|
||||
const ociImageIndexFile = "index.json"
|
||||
|
||||
// ociBlobsDir is the name of the blobs directory
|
||||
// from the OCI Image Layout Specification.
|
||||
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc4/image-layout.md#content
|
||||
const ociBlobsDir = "blobs"
|
||||
|
||||
// Store implements `oras.Target`, and represents a content store
|
||||
// based on file system with the OCI-Image layout.
|
||||
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc4/image-layout.md
|
||||
@@ -89,13 +79,13 @@ func NewWithContext(ctx context.Context, root string) (*Store, error) {
|
||||
store := &Store{
|
||||
AutoSaveIndex: true,
|
||||
root: rootAbs,
|
||||
indexPath: filepath.Join(rootAbs, ociImageIndexFile),
|
||||
indexPath: filepath.Join(rootAbs, ocispec.ImageIndexFile),
|
||||
storage: storage,
|
||||
tagResolver: resolver.NewMemory(),
|
||||
graph: graph.NewMemory(),
|
||||
}
|
||||
|
||||
if err := ensureDir(filepath.Join(rootAbs, ociBlobsDir)); err != nil {
|
||||
if err := ensureDir(filepath.Join(rootAbs, ocispec.ImageBlobsDir)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := store.ensureOCILayoutFile(); err != nil {
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ func validateOCILayout(layout *ocispec.ImageLayout) error {
|
||||
|
||||
// loadIndexFile reads index.json from s.fsys.
|
||||
func (s *ReadOnlyStore) loadIndexFile(ctx context.Context) error {
|
||||
indexFile, err := s.fsys.Open(ociImageIndexFile)
|
||||
indexFile, err := s.fsys.Open(ocispec.ImageIndexFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to open index file: %w", err)
|
||||
}
|
||||
|
||||
@@ -95,5 +95,5 @@ func blobPath(dgst digest.Digest) (string, error) {
|
||||
return "", fmt.Errorf("cannot calculate blob path from invalid digest %s: %w: %v",
|
||||
dgst.String(), errdef.ErrInvalidDigest, err)
|
||||
}
|
||||
return path.Join(ociBlobsDir, dgst.Algorithm().String(), dgst.Encoded()), nil
|
||||
return path.Join(ocispec.ImageBlobsDir, dgst.Algorithm().String(), dgst.Encoded()), nil
|
||||
}
|
||||
|
||||
Vendored
+15
-7
@@ -393,18 +393,26 @@ func prepareCopy(ctx context.Context, dst Target, dstRef string, proxy *cas.Prox
|
||||
|
||||
onCopySkipped := opts.OnCopySkipped
|
||||
opts.OnCopySkipped = func(ctx context.Context, desc ocispec.Descriptor) error {
|
||||
if !content.Equal(desc, root) {
|
||||
if onCopySkipped != nil {
|
||||
return onCopySkipped(ctx, desc)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// enforce tagging when the skipped node is root
|
||||
if refPusher, ok := dst.(registry.ReferencePusher); ok {
|
||||
// NOTE: refPusher tags the node by copying it with the reference,
|
||||
// so onCopySkipped shouldn't be invoked in this case
|
||||
return copyCachedNodeWithReference(ctx, proxy, refPusher, desc, dstRef)
|
||||
}
|
||||
|
||||
// invoke onCopySkipped before tagging
|
||||
if onCopySkipped != nil {
|
||||
if err := onCopySkipped(ctx, desc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if !content.Equal(desc, root) {
|
||||
return nil
|
||||
}
|
||||
// enforce tagging when root is skipped
|
||||
if refPusher, ok := dst.(registry.ReferencePusher); ok {
|
||||
return copyCachedNodeWithReference(ctx, proxy, refPusher, desc, dstRef)
|
||||
}
|
||||
return dst.Tag(ctx, root, dstRef)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user