Skip to content

Adds sort by publish date for container registry tags list

What does this MR do and why?

Adds sort by publish date for container registry tags list

When container metdata database in enabled, additional option to sort by published at date is added to the sort dropdown and set as default.

The MR also removes extra name parameter added to tags GraphQL query

Changelog: added

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-05-17_at_11.42.55_PM Screenshot_2024-05-17_at_11.41.15_PM

How to set up and validate locally

  1. Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md

  2. Make sure to enable the metadata database https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/database-local-setup.md?ref_type=heads

  3. 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

  4. Run the following in the terminal

    $ ./publish.sh <project-path> 25 1 127.0.0.1:5000 # creates 1 image with 25 tags
  5. Visit the container registry tags list page in group & project view

  6. Confirm that the default sort is published descending(most recent first).

  7. Confirm that sorting by Name & free text search works as expected & the URL is updated.

  8. Confirm that when container registry metadata database is disabled & GITLAB_SIMULATE_SAAS is not set, sort by published is not visible.

Related to #351031

Edited by Rahul Chanila

Merge request reports