Skip to content

Rephrase the subject exclusion from validation#445

Merged
jdolitsky merged 1 commit intoopencontainers:mainfrom
sudo-bmitch:pr-subject-missing
Jul 27, 2023
Merged

Rephrase the subject exclusion from validation#445
jdolitsky merged 1 commit intoopencontainers:mainfrom
sudo-bmitch:pr-subject-missing

Conversation

@sudo-bmitch
Copy link
Copy Markdown
Contributor

Fixes #442.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
Copy link
Copy Markdown
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

A registry MAY reject a manifest of any type uploaded to the manifest endpoint if it references manifests or blobs that do not exist in the registry.
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.
When a manifest is rejected for these reasons, it MUST result in one or more `MANIFEST_BLOB_UNKNOWN` errors <sup>[code-1](#error-codes)</sup>.
A registry MAY reject a manifest uploaded to the manifest endpoint with descriptors in other fields that reference a manifest or blob that does not exist in the registry.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swapping the order of these lines makes "otherwise valid manifest" a strange phrase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we removed "otherwise valid", then couldn't someone upload an invalid manifest (missing fields, unknown media type, etc), but include a subject field and insist that the manifest must now be accepted?

@jdolitsky jdolitsky merged commit 60fc69c into opencontainers:main Jul 27, 2023
@sudo-bmitch sudo-bmitch deleted the pr-subject-missing branch July 27, 2023 10:32
sudo-bmitch added a commit to sudo-bmitch/distribution-spec that referenced this pull request Aug 18, 2023
Signed-off-by: Brandon Mitchell <git@bmitch.net>
@jdolitsky jdolitsky mentioned this pull request Jan 11, 2024
8 tasks
@sudo-bmitch sudo-bmitch mentioned this pull request Feb 1, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify conditions under which the registry may reject a manifest for having non-existent references

6 participants