Clarify the registry must accept a missing subject phrasing#505
Conversation
Signed-off-by: Brandon Mitchell <git@bmitch.net>
| A useful diagram is provided [here](https://github.com/google/go-containerregistry/tree/d7f8d06c87ed209507dd5f2d723267fe35b38a9f/pkg/v1/remote#anatomy-of-an-image-upload). | ||
|
|
||
| A registry MUST accept an otherwise valid manifest with a `subject` field that references a manifest that does not exist, allowing clients to push a manifest and referrers to that manifest in either order. | ||
| A registry MUST initially accept an otherwise valid manifest with a `subject` field that references a manifest that does not exist in the repository, allowing clients to push a manifest and referrers to that manifest in either order. |
There was a problem hiding this comment.
Also add the language?
The subject relationship is a weak association, pls see image spec, etc?
There was a problem hiding this comment.
@rchincha how should that be phrased here?
There was a problem hiding this comment.
@rchincha would you be opposed to leaving that off for a subsequent patch or minor version, as we look to clarify more language over time?
I think it'd be fine to add it, depending on wording, but it might stand out and lead to more questions when comparing the two specs. Just devil's advocate, I think it'd be fine either way.
There was a problem hiding this comment.
weak / strong are certainly common vernacular but would raise more questions.. also probably not the right place to define subject descriptor reference..
There was a problem hiding this comment.
see above subject definition:
- **Subject**: an association from one manifest to another, typically used to attach an artifact to an image.
maybe in another PR and change ^ to is an association, aka. a weak reference, from one manifest to another, typically used to attach an artifact to an image.
but that implies we should use strong for content descriptors... yada yada
There was a problem hiding this comment.
I see the ^ definition changed over in the image spec.. ::
- **`subject`** *[descriptor](descriptor.md)*
This OPTIONAL property specifies a [descriptor](descriptor.md) of another manifest.
This value defines a weak association to a separate [Merkle Directed Acyclic Graph (DAG)][dag] structure, and is used by the [`referrers` API][referrers-api] to include this manifest in the list of responses for the subject digest.
There was a problem hiding this comment.
given the new definition in image.. I think we can just link to that definition and/or normalize in distribution's definition by saying a weak association in the definition we have here...
This is resolving concerns raised in #502 and discussed on today's meeting.