Show supported platforms for image indexes

What does this MR do and why?

Show supported platforms for image indexes.

For OCI image indexes or docker manifest lists, add a new Supported platforms: row to the details table below each tag. When the details are expanded, fetch tag details via the new GraphQL query (introduced with !225701 (merged)), which provides the list of supported platforms. Render as a set of badges, to convey the supported platform details. Additionally, hard-codes a set of labels for the Windows os.version, following the tag format from https://hub.docker.com/r/microsoft/windows-nanoserver, and supplementing with info from https://learn.microsoft.com/en-us/windows/release-health/release-information to look up the mappings.

References

Proposed implementation for #369852 (closed) and/or #408873.

Requires !225701 (merged) to provide the GraphQL query, and optionally container-registry!2828 (merged) to populate variant and osVersion in the response.

Screenshots or screen recordings

Before After
Before this change, no Supported platforms: row exists.
Old recording

How to set up and validate locally

I assume, before this is ready to be merged, we will want to create a feature flag. None has yet been created. For the two MR dependencies, this branch includes !225701 (merged), so nothing is needed to make that content available. However, if you want to display variant or os.version data from your list/index, you'll also need to run container-registry!2828 (merged) in your GDK in order to supply the data.

  1. Ensure you have the container-registry metadata database enabled in your GDK.
  2. Ensure you have a project created with a container registry enabled.
  3. Enable the feature flag with: Feature.enable(:container_registry_display_supported_platforms, test_project)
  4. Push at least one Docker Manifest List or OCI Image Index to your project's container registry.
  5. Browse to the project's container registry, e.g. http://localhost:3000/gitlab/gitlab-runner/container_registry/4.
  6. Click Show Details on a Docker Manifest List / OCI Image Index tag.
  7. Observe the values in the Supported platforms: row.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Anthony Juckel

Merge request reports

Loading