You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client-implementation.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ This section describes how client fallback procedures when an API is not availab
11
11
12
12
The Referrers API here is described by [Listing Referrers](spec.md#listing-referrers) and [end-12](spec.md#endpoints).
13
13
14
-
A client that pushing an Image or Artifact manifest with a defined `Refers` field MUST verify the Referrers API is available.
14
+
A client that pushes an Image or Artifact manifest with a defined `Refers` field MUST verify the Referrers API is available.
15
15
A client querying the Referrers API and receiving a 404 MUST fallback to using an Index pushed to a tag described by the following schema.
16
16
17
-
**Tag Schema**
17
+
#### Referrers Tag Schema
18
18
19
19
```text
20
20
<alg>-<ref>
@@ -25,7 +25,7 @@ A client querying the Referrers API and receiving a 404 MUST fallback to using a
25
25
26
26
For example, a manifest with the `Refers` field digest set to `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in the `registry.example.org/project` repository would have a expect an Index at `registry.example.org/project:sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`
27
27
28
-
**Pushing Manifests**
28
+
#### Pushing Manifests with Refers
29
29
30
30
When pushing an Image or Artifact manifest with the `Refers` field and the Referrers API returns a 404, the client MUST:
31
31
@@ -39,13 +39,13 @@ When pushing an Image or Artifact manifest with the `Refers` field and the Refer
39
39
1. Push the updated Index using the same tag schema.
40
40
The client MAY use conditional HTTP requests to prevent overwriting an Index that has changed since it was first pulled.
41
41
42
-
**Listing Referrers**
42
+
#### Listing Referrers
43
43
44
44
If the Referrers API returns a 404, the client MUST fallback to pulling the tag schema.
45
45
The response SHOULD be an Index with the same content that would be expected from the Referrers API.
46
46
If the response to the Referrers API is a 404, and the tag schema does not return a valid Index, the client SHOULD assume there are no Referrers to the manifest.
47
47
48
-
**Deleting Referrers**
48
+
#### Deleting Referrers
49
49
50
50
When deleting an Image or Artifact manifest that contains a `Refers` field, and the Referrers API returns a 404, clients SHOULD:
51
51
@@ -54,11 +54,11 @@ When deleting an Image or Artifact manifest that contains a `Refers` field, and
54
54
1. Push the updated Index using the same tag schema.
55
55
The client MAY use conditional HTTP requests to prevent overwriting an Index that has changed since it was first pulled.
56
56
57
-
**Deleting Manifests**
57
+
#### Deleting Manifests with Referrers
58
58
59
59
Clients MAY delete a tag using the tag schema when it returns a valid Index manifest and the referred manifest has been deleted.
60
60
61
-
**Recommendations**
61
+
#### Referrers API Recommendations
62
62
63
63
- Clients MAY verify the registry does not support the referrers API by querying the API and checking for a 404.
64
64
- When the Referrers API is not available, clients MAY perform periodic garbage collection of stale tag schema tags and descriptors in the Index manifest list that no longer exist.
0 commit comments