Skip to content

Display container image shortened path with option to expand

What does this MR do and why?

Display an image's shortened path with an option to expand.

Screenshots or screen recordings

state screenshot
before Screen_Shot_2022-07-04_at_8.37.02_pm
with feature flag Screen_Shot_2022-07-06_at_6.48.50_pm
click Screen_Shot_2022-07-04_at_8.37.02_pm
track Screen_Shot_2022-07-06_at_6.17.18_pm
tooltip Screen_Shot_2022-07-08_at_1.13.22_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. Choose a group that has no images, using gitlab-org as example which has gitlab-test as project
  3. Create nested subgroup structure, example gitlab-org/alpine/hello-world
  4. Add project hello-world to above subgroup
  5. Run the following
docker pull alpine:latest
docker tag alpine:latest 127.0.0.1:5000/gitlab-org/gitlab-test:latest 
docker push 127.0.0.1:5000/gitlab-org/gitlab-test:latest
docker tag alpine:latest 127.0.0.1:5000/gitlab-org/gitlab-org/alpine/hello-world/hello-world
docker push 127.0.0.1:5000/gitlab-org/gitlab-org/alpine/hello-world/hello-world
  1. Visit the container registry page for group http://gdk.test:3000/groups/gitlab-org/-/container_registries & make sure the images are listed & show their full path.
  2. Enable feature
$ rails c
> Feature.enable(:container_registry_show_shortened_path)
  1. Refresh above page to see button to expand shortened path,
    1. also confirm that image name is shortened.
    2. Make sure focus is set to the image name link
    3. Make sure event is tracked when the button is clicked.
  2. Disable feature to confirm that feature is turned off

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #364290 (closed)

Edited by Rahul Chanila

Merge request reports