Add support for Docker manifest lists and OCI indexes to GitLab container registry client
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Context
Right now the container registry client within GitLab is only advertising support for two media types (source):
application/vnd.docker.distribution.manifest.v2+jsonapplication/vnd.oci.image.manifest.v1+json
Support for application/vnd.docker.distribution.manifest.list.v2+json and application/vnd.oci.image.index.v1+json are only advertised for Geo specific operations (source).
Problem
Without application/vnd.docker.distribution.manifest.list.v2+json and application/vnd.oci.image.index.v1+json media types on the list of ACCEPTED_TYPES, when trying to obtain details about a manifest of said types, the registry will (correctly) error with a message like OCI index found, but accept header does not support OCI indexes, and Rails is therefore unable to obtain the payload.
We should add support for these media types so that the manifest payload can be obtained. It's possible that we have to touch on other parts of the client code where it may not be ready to deal with a manifest list/index payload where some fields (such as the config) are not present.