-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index with subject
but contains no artifactType
#1106
Comments
Also created an issue on distribution-spec side opencontainers/distribution-spec#458 since it's related to the implementation of referrers API and tag-schema fallback. |
This is related to #1020 and #1077. CC @vbatts and @sajayantony from those PRs. |
Is this stemming from the fact that the artifact Type is a MUST from the referreres API ? |
Yes.
Good catch. Index with |
I'd be curious how to write the json schema for that. Is there a "conditional required" syntax? Ref: image-spec/schema/image-index-schema.json Line 96 in 4b568ff
|
Wouldn't that be "dependentRequired": {
"subject": ["artifactType"]
} |
From the call today there were multiple options discussed of from making |
Can you help elaborate on what's the motivation for this preference of making it optional? Will it also be applied to image referrer descriptors? Synced offline with @sajayantony, making |
Closing as it should be fixed by making artifact type optional in the Referrers API in distribution-spec. Let's continue the discussion in opencontainers/distribution-spec#458 |
OCI image spec 1.1.0-rc4 allows image index to have
subject
(updated in this commit) andartifactType
(update in this commit). Since both fields are optional, it's possible that user can push an index withsubject
but noartifactType
like below.Should we enforce the requirement on both fields like: if
subject
is presented,artifactType
MUST be presented, otherwise the index is invalid?The text was updated successfully, but these errors were encountered: