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
fix: Accept schema 2 images as OCI index children (PROJQUAY-4826) #1959
base: master
Are you sure you want to change the base?
Conversation
Is this according to standard? |
@ibazulic apparently no, so the PR is updated; now it's about supporting schema 2 images in OCI image indexes. |
@dmage Discussion here: opencontainers/image-spec#1150 |
Apparently, it's our choice whether to support it or not. |
@@ -262,6 +264,8 @@ def manifests(self, content_retriever): | |||
""" | |||
manifests = self._parsed[INDEX_MANIFESTS_KEY] | |||
supported_types = {} | |||
supported_types[DOCKER_SCHEMA2_MANIFEST_CONTENT_TYPE] = DockerSchema2Manifest | |||
supported_types[DOCKER_SCHEMA2_MANIFESTLIST_CONTENT_TYPE] = DockerSchema2ManifestList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of assumptions in the code when dealing with parent tags of manifest lists. This might break some of those assumptions. e.g. When expiring a tag past the time machine, we expire the parent tag. In this scenario it's actually the parent tag of the parent tag that would need to be expired. Garbage collection also just checks the parent tag. We would probably want some additional testing around this to what exactly happens when you push nested manifest lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this line because there is already one for OCI index:
supported_types[OCI_IMAGE_INDEX_CONTENT_TYPE] = OCIIndex
This change fixes PROJQUAY-4826.