Skip to content

Commit 853e012

Browse files
authored
chore: update to image-spec v1.1.1 (#909)
1. Use the media type regex defined in [`image-spec v1.1.1`](https://github.com/opencontainers/image-spec/blob/v1.1.1/schema/defs-descriptor.json#L7) in `pack.go` 2. Update the doc links to reference `image-spec v1.1.1` and `distribution-spec v1.1.1` Resolves: #910 Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
1 parent 1b77bfd commit 853e012

14 files changed

+47
-47
lines changed

content/oci/oci.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ limitations under the License.
1414
*/
1515

1616
// Package oci provides access to an OCI content store.
17-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md
17+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md
1818
package oci
1919

2020
import (
@@ -44,7 +44,7 @@ import (
4444

4545
// Store implements `oras.Target`, and represents a content store
4646
// based on file system with the OCI-Image layout.
47-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md
47+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md
4848
type Store struct {
4949
// AutoSaveIndex controls if the OCI store will automatically save the index
5050
// file when needed.
@@ -222,7 +222,7 @@ func (s *Store) delete(ctx context.Context, target ocispec.Descriptor) ([]ocispe
222222

223223
// Tag tags a descriptor with a reference string.
224224
// reference should be a valid tag (e.g. "latest").
225-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md#indexjson-file
225+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#indexjson-file
226226
func (s *Store) Tag(ctx context.Context, desc ocispec.Descriptor, reference string) error {
227227
s.sync.RLock()
228228
defer s.sync.RUnlock()

content/oci/readonlyoci.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636

3737
// ReadOnlyStore implements `oras.ReadonlyTarget`, and represents a read-only
3838
// content store based on file system with the OCI-Image layout.
39-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md
39+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md
4040
type ReadOnlyStore struct {
4141
fsys fs.FS
4242
storage content.ReadOnlyStorage

content/oci/readonlystorage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131

3232
// ReadOnlyStorage is a read-only CAS based on file system with the OCI-Image
3333
// layout.
34-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md
34+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md
3535
type ReadOnlyStorage struct {
3636
fsys fs.FS
3737
}

content/oci/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var bufPool = sync.Pool{
4343
}
4444

4545
// Storage is a CAS based on file system with the OCI-Image layout.
46-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/image-layout.md
46+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md
4747
type Storage struct {
4848
*ReadOnlyStorage
4949
// root is the root directory of the OCI layout.

example_pack_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
// ExampleImageV11 demonstrates packing an OCI Image Manifest as defined in
29-
// image-spec v1.1.0.
29+
// image-spec v1.1.1.
3030
func ExamplePackManifest_imageV11() {
3131
// 0. Create a storage
3232
store := memory.New()

pack.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ const (
7878
PackManifestVersion1_1_RC4 PackManifestVersion = PackManifestVersion1_1
7979

8080
// PackManifestVersion1_1 represents the OCI Image Manifest defined in
81-
// image-spec v1.1.0.
82-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md
81+
// image-spec v1.1.1.
82+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/manifest.md
8383
PackManifestVersion1_1 PackManifestVersion = 2
8484
)
8585

@@ -110,9 +110,9 @@ type PackManifestOptions struct {
110110

111111
// mediaTypeRegexp checks the format of media types.
112112
// References:
113-
// - https://github.com/opencontainers/image-spec/blob/v1.1.0/schema/defs-descriptor.json#L7
113+
// - https://github.com/opencontainers/image-spec/blob/v1.1.1/schema/defs-descriptor.json#L7
114114
// - https://datatracker.ietf.org/doc/html/rfc6838#section-4.2
115-
var mediaTypeRegexp = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}/[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}$`)
115+
var mediaTypeRegexp = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$`)
116116

117117
// PackManifest generates an OCI Image Manifest based on the given parameters
118118
// and pushes the packed manifest to a content storage using pusher. The version
@@ -301,8 +301,8 @@ func packManifestV1_1_RC2(ctx context.Context, pusher content.Pusher, configMedi
301301
return pushManifest(ctx, pusher, manifest, manifest.MediaType, manifest.Config.MediaType, manifest.Annotations)
302302
}
303303

304-
// packManifestV1_1 packs an image manifest defined in image-spec v1.1.0.
305-
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#guidelines-for-artifact-usage
304+
// packManifestV1_1 packs an image manifest defined in image-spec v1.1.1.
305+
// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.1/manifest.md#guidelines-for-artifact-usage
306306
func packManifestV1_1(ctx context.Context, pusher content.Pusher, artifactType string, opts PackManifestOptions) (ocispec.Descriptor, error) {
307307
if artifactType == "" && (opts.ConfigDescriptor == nil || opts.ConfigDescriptor.MediaType == ocispec.MediaTypeEmptyJSON) {
308308
// artifactType MUST be set when config.mediaType is set to the empty value

registry/reference.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ var (
3434
//
3535
// References:
3636
// - https://github.com/distribution/distribution/blob/v2.7.1/reference/regexp.go#L53
37-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pulling-manifests
37+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pulling-manifests
3838
repositoryRegexp = regexp.MustCompile(`^[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*(?:/[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)*$`)
3939

4040
// tagRegexp checks the tag name.
4141
// The docker and OCI spec have the same regular expression.
4242
//
43-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pulling-manifests
43+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pulling-manifests
4444
tagRegexp = regexp.MustCompile(`^[\w][\w.-]{0,127}$`)
4545
)
4646

registry/remote/errcode/errors.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
)
2525

2626
// References:
27-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#error-codes
27+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#error-codes
2828
// - https://docs.docker.com/registry/spec/api/#errors-2
2929
const (
3030
ErrorCodeBlobUnknown = "BLOB_UNKNOWN"
@@ -45,7 +45,7 @@ const (
4545
// Error represents a response inner error returned by the remote
4646
// registry.
4747
// References:
48-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#error-codes
48+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#error-codes
4949
// - https://docs.docker.com/registry/spec/api/#errors-2
5050
type Error struct {
5151
Code string `json:"code"`
@@ -73,7 +73,7 @@ func (e Error) Error() string {
7373
// Errors represents a list of response inner errors returned by the remote
7474
// server.
7575
// References:
76-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#error-codes
76+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#error-codes
7777
// - https://docs.docker.com/registry/spec/api/#errors-2
7878
type Errors []Error
7979

registry/remote/referrers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (e *ReferrersError) IsReferrersIndexDelete() bool {
102102

103103
// buildReferrersTag builds the referrers tag for the given manifest descriptor.
104104
// Format: <algorithm>-<digest>
105-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#unavailable-referrers-api
105+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#unavailable-referrers-api
106106
func buildReferrersTag(desc ocispec.Descriptor) string {
107107
alg := desc.Digest.Algorithm().String()
108108
encoded := desc.Digest.Encoded()

registry/remote/registry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (r *Registry) do(req *http.Request) (*http.Response, error) {
9494
//
9595
// References:
9696
// - https://docs.docker.com/registry/spec/api/#base
97-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#api
97+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#api
9898
func (r *Registry) Ping(ctx context.Context) error {
9999
url := buildRegistryBaseURL(r.PlainHTTP, r.Reference)
100100
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)

registry/remote/repository.go

+21-21
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ const (
5353
//
5454
// References:
5555
// - https://docs.docker.com/registry/spec/api/#digest-header
56-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pull
56+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pull
5757
headerDockerContentDigest = "Docker-Content-Digest"
5858

5959
// headerOCIFiltersApplied is the "OCI-Filters-Applied" header.
6060
// If present on the response, it contains a comma-separated list of the
6161
// applied filters.
6262
//
6363
// Reference:
64-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
64+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
6565
headerOCIFiltersApplied = "OCI-Filters-Applied"
6666

6767
// headerOCISubject is the "OCI-Subject" header.
@@ -74,7 +74,7 @@ const (
7474
// referrers.
7575
//
7676
// References:
77-
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
77+
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
7878
// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers
7979
const filterTypeArtifactType = "artifactType"
8080

@@ -138,16 +138,16 @@ type Repository struct {
138138
// is successfully uploaded.
139139
// - If true, the old referrers index is kept.
140140
// By default, it is disabled (set to false). See also:
141-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#referrers-tag-schema
142-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pushing-manifests-with-subject
143-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#deleting-manifests
141+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#referrers-tag-schema
142+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pushing-manifests-with-subject
143+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#deleting-manifests
144144
SkipReferrersGC bool
145145

146146
// HandleWarning handles the warning returned by the remote server.
147147
// Callers SHOULD deduplicate warnings from multiple associated responses.
148148
//
149149
// References:
150-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#warnings
150+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#warnings
151151
// - https://www.rfc-editor.org/rfc/rfc7234#section-5.5
152152
HandleWarning func(warning Warning)
153153

@@ -217,9 +217,9 @@ func (r *Repository) clone() *Repository {
217217
// SetReferrersCapability returns ErrReferrersCapabilityAlreadySet if the
218218
// Referrers API capability has been already set.
219219
// - When the capability is set to true, the Referrers() function will always
220-
// request the Referrers API. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
220+
// request the Referrers API. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
221221
// - When the capability is set to false, the Referrers() function will always
222-
// request the Referrers Tag. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#referrers-tag-schema
222+
// request the Referrers Tag. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#referrers-tag-schema
223223
// - When the capability is not set, the Referrers() function will automatically
224224
// determine which API to use.
225225
func (r *Repository) SetReferrersCapability(capable bool) error {
@@ -393,7 +393,7 @@ func (r *Repository) ParseReference(reference string) (registry.Reference, error
393393
// of the Tags list.
394394
//
395395
// References:
396-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#content-discovery
396+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#content-discovery
397397
// - https://docs.docker.com/registry/spec/api/#tags
398398
func (r *Repository) Tags(ctx context.Context, last string, fn func(tags []string) error) error {
399399
ctx = auth.AppendRepositoryScope(ctx, r.Reference, auth.ActionPull)
@@ -452,7 +452,7 @@ func (r *Repository) tags(ctx context.Context, last string, fn func(tags []strin
452452
// Predecessors returns the descriptors of image or artifact manifests directly
453453
// referencing the given manifest descriptor.
454454
// Predecessors internally leverages Referrers.
455-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
455+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
456456
func (r *Repository) Predecessors(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
457457
var res []ocispec.Descriptor
458458
if err := r.Referrers(ctx, desc, "", func(referrers []ocispec.Descriptor) error {
@@ -471,7 +471,7 @@ func (r *Repository) Predecessors(ctx context.Context, desc ocispec.Descriptor)
471471
// If artifactType is not empty, only referrers of the same artifact type are
472472
// fed to fn.
473473
//
474-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
474+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
475475
func (r *Repository) Referrers(ctx context.Context, desc ocispec.Descriptor, artifactType string, fn func(referrers []ocispec.Descriptor) error) error {
476476
state := r.loadReferrersState()
477477
if state == referrersStateUnsupported {
@@ -570,7 +570,7 @@ func (r *Repository) referrersPageByAPI(ctx context.Context, artifactType string
570570
referrers := index.Manifests
571571
if artifactType != "" {
572572
// check both filters header and filters annotations for compatibility
573-
// latest spec for filters header: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
573+
// latest spec for filters header: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
574574
// older spec for filters annotations: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers
575575
filtersHeader := resp.Header.Get(headerOCIFiltersApplied)
576576
filtersAnnotation := index.Annotations[spec.AnnotationReferrersFiltersApplied]
@@ -592,7 +592,7 @@ func (r *Repository) referrersPageByAPI(ctx context.Context, artifactType string
592592
// referencing the given manifest descriptor by requesting referrers tag.
593593
// fn is called for the referrers result. If artifactType is not empty,
594594
// only referrers of the same artifact type are fed to fn.
595-
// reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#backwards-compatibility
595+
// reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#backwards-compatibility
596596
func (r *Repository) referrersByTagSchema(ctx context.Context, desc ocispec.Descriptor, artifactType string, fn func(referrers []ocispec.Descriptor) error) error {
597597
referrersTag := buildReferrersTag(desc)
598598
_, referrers, err := r.referrersFromIndex(ctx, referrersTag)
@@ -809,7 +809,7 @@ func (s *blobStore) Mount(ctx context.Context, desc ocispec.Descriptor, fromRepo
809809
// push it. If the caller has provided a getContent function, we
810810
// can use that, otherwise pull the content from the source repository.
811811
//
812-
// [spec]: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#mounting-a-blob-from-another-repository
812+
// [spec]: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#mounting-a-blob-from-another-repository
813813

814814
var r io.ReadCloser
815815
if getContent != nil {
@@ -844,7 +844,7 @@ func (s *blobStore) sibling(otherRepoName string) *blobStore {
844844
// References:
845845
// - https://docs.docker.com/registry/spec/api/#pushing-an-image
846846
// - https://docs.docker.com/registry/spec/api/#initiate-blob-upload
847-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pushing-a-blob-monolithically
847+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pushing-a-blob-monolithically
848848
func (s *blobStore) Push(ctx context.Context, expected ocispec.Descriptor, content io.Reader) error {
849849
// start an upload
850850
// pushing usually requires both pull and push actions.
@@ -1154,7 +1154,7 @@ func (s *manifestStore) deleteWithIndexing(ctx context.Context, target ocispec.D
11541154
// on manifest delete.
11551155
//
11561156
// References:
1157-
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#deleting-manifests
1157+
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#deleting-manifests
11581158
// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#deleting-manifests
11591159
func (s *manifestStore) indexReferrersForDelete(ctx context.Context, desc ocispec.Descriptor, manifestJSON []byte) error {
11601160
var manifest struct {
@@ -1340,7 +1340,7 @@ func (s *manifestStore) push(ctx context.Context, expected ocispec.Descriptor, c
13401340

13411341
// checkOCISubjectHeader checks the "OCI-Subject" header in the response and
13421342
// sets referrers capability accordingly.
1343-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pushing-manifests-with-subject
1343+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pushing-manifests-with-subject
13441344
func (s *manifestStore) checkOCISubjectHeader(resp *http.Response) {
13451345
// If the "OCI-Subject" header is set, it indicates that the registry
13461346
// supports the Referrers API and has processed the subject of the manifest.
@@ -1391,7 +1391,7 @@ func (s *manifestStore) pushWithIndexing(ctx context.Context, expected ocispec.D
13911391
// on manifest push.
13921392
//
13931393
// References:
1394-
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pushing-manifests-with-subject
1394+
// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pushing-manifests-with-subject
13951395
// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pushing-manifests-with-subject
13961396
func (s *manifestStore) indexReferrersForPush(ctx context.Context, desc ocispec.Descriptor, manifestJSON []byte) error {
13971397
var subject ocispec.Descriptor
@@ -1448,8 +1448,8 @@ func (s *manifestStore) indexReferrersForPush(ctx context.Context, desc ocispec.
14481448
// updateReferrersIndex updates the referrers index for desc referencing subject
14491449
// on manifest push and manifest delete.
14501450
// References:
1451-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#pushing-manifests-with-subject
1452-
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#deleting-manifests
1451+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#pushing-manifests-with-subject
1452+
// - https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#deleting-manifests
14531453
func (s *manifestStore) updateReferrersIndex(ctx context.Context, subject ocispec.Descriptor, change referrerChange) (err error) {
14541454
referrersTag := buildReferrersTag(subject)
14551455

registry/remote/url.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func buildRepositoryBlobMountURL(plainHTTP bool, ref registry.Reference, d diges
101101

102102
// buildReferrersURL builds the URL for querying the Referrers API.
103103
// Format: <scheme>://<registry>/v2/<repository>/referrers/<digest>?artifactType=<artifactType>
104-
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers
104+
// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.1/spec.md#listing-referrers
105105
func buildReferrersURL(plainHTTP bool, ref registry.Reference, artifactType string) string {
106106
var query string
107107
if artifactType != "" {

0 commit comments

Comments
 (0)