Displays the last published date for container repository
What does this MR do and why?
Displays the last published date for container repository.
The field was added in Expose last_published_at field from the contain... (!151506 - merged) to the GraphQL API.
This is shown in the container registry details page.
lastPublishedAt
field can be null
from GraphQL,
so this MR also handles that scenario.
Edit: Added couple of extra commits which
- Updates registry header to display images count with larger size (fixes issue mentioned in internal discussion)
- Updates
details_header
to conditionally fetch metadata based on metadata database enabled flag #290949 (comment 1911945594)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
-
Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
-
Make sure to enable the metadata database https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/database-local-setup.md?ref_type=heads
-
Follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry
-
Run the following in the terminal
$ ./publish.sh <project-path> 5 1 127.0.0.1:5000 # creates 1 image with 5 tags
-
Visit the container registry tags list page in group & project view
-
Confirm that last published date is visible on the image repository details header
-
Confirm that when container registry metadata database is disabled &
GITLAB_SIMULATE_SAAS
is not set, last published date is not visible on the image repository,
Related to #290949 (closed)