Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmage
Copy link
Member

@dmage dmage commented Jun 9, 2023

This change fixes PROJQUAY-4826.

@dmage dmage requested review from syed and bcaton85 June 9, 2023 14:00
@ibazulic
Copy link
Member

ibazulic commented Jun 9, 2023

Is this according to standard?

https://docs.docker.com/registry/spec/manifest-v2-2/

@dmage dmage changed the title fix: Accept OCI images as children of schema2 manifest list (PROJQUAY-5614) fix: Accept schema 2 images as OCI index children (PROJQUAY-4826) Jun 9, 2023
@dmage
Copy link
Member Author

dmage commented Jun 9, 2023

@ibazulic apparently no, so the PR is updated; now it's about supporting schema 2 images in OCI image indexes.

@ibazulic
Copy link
Member

@dmage Discussion here: opencontainers/image-spec#1150

@ibazulic
Copy link
Member

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
Copy link
Contributor

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.

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants