Add new query for fetching container registry tag details
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Context
We have a proposal to implement Create separate page to show container image ta... (#497121)
The frontend needs a GraphQL API to display this page.
As of writing, we have the following query available & it is responsible for the data visible on the tags list page.
containerRepository(id: <id>) {
id
manifest(reference: <digest>)
tags(first: 10) {
nodes {
id
digest
// more tag fields
}
}
// more container repository fields
}
However there is no query to fetch tag details.
Additionally, we need manifests data for each image tag to be visible on this page, which can be re-used for Display additional details for container regist... (#408873) and Show supported platform(s) of multi-architectur... (#369852). However we want to take into consideration #408873 (comment 2131272024),
the details view will keep gathering more information over time, especially for lists/indexes, to the point where the performance/efficiency hit would become unacceptable (we won't be able to concentrate all the information in a single tags list response).
We don't want to overload the backend with requests for manifests on the tags list page & want to request these details separately.
We do have a manifest field on the containerRepository query & it returns the raw manifest data. This needs to be parsed on the frontend to show these details & this could be error-prone
Proposal
Add a new query to fetch container registry tag details like so:
containerImageTag(id: <gid-of-parent-repository>, name: <image-name>) {
id
name
digest
...ContainerRepositoryTagTypeFields
manifests {
digest
mediaType
platformOs
platformArchitecture
size
}
__typename // ContainerRepositoryTagDetailsType
}
The new query is to return a new ContainerRepositoryTagDetailsType graphql type that extends ContainerRepositoryTagType and additionally manifests.