Skip to content

Enable sorting tags by published at for self-managed

What does this MR do and why?

This MR enables the sorting of tags by published_at for migrated self-manage as well. Previously, we only have this feature available for Gitlab.com? but now we open it to any instance that supports the Gitlab API.

Issue link: #458822

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

Sorting: Name - ascending Screenshot_2024-07-09_at_11.22.54
Sorting: Published At - ascending [NEW] Screenshot_2024-07-09_at_11.25.36
Sorting: Published At - descending [NEW] Screenshot_2024-07-09_at_11.22.15

How to set up and validate locally

Prerequisites:

A. Check that you have the latest version of the Container Registry, or at least 3.92.0 when this new field was added to the container registry.

B. Check that your Gitlab version locally is 16.11 and later.

C. Push a tag to a container repository

D. Verify that the Gitlab API is supported:

ContainerRegistry::GitlabApiClient.supports_gitlab_api?
#=> true

E. IMPORTANT: Make sure that your setup is not simulating SAAS. You might want to run export GITLAB_SIMULATE_SAAS=0 before gdk start just to make sure.

Steps:

  1. Go to a project's Container Registry Page (Sample URL: http://gdk.test:3000/group-may2024/project-may2024/container_registry/)
  2. Click on a repository with multiple tags (feel free to also create one and push tags if you don't have yet)
  3. Try to sort by Published both ascending and descending.

Screenshot_2024-07-09_at_12.12.08

Related to #458822

Edited by Adie (she/her)

Merge request reports