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.
- Creates new development feature flag
container_registry_show_shortened_path
- This feature is to be rolled out in a phased manner to users, associated feature flag issue: [Feature flag] Rollout of `container_registry_s... (#366808 - closed)
- Enabled tracking to measure usage
Screenshots or screen recordings
state | screenshot |
---|---|
before | |
with feature flag | |
click | |
track | |
tooltip |
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
- Choose a group that has no images, using
gitlab-org
as example which hasgitlab-test
as project - Create nested subgroup structure, example
gitlab-org/alpine/hello-world
- Add project
hello-world
to above subgroup - 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
- 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.
- Enable feature
$ rails c
> Feature.enable(:container_registry_show_shortened_path)
- Refresh above page to see button to expand shortened path,
- also confirm that image name is shortened.
- Make sure focus is set to the image name link
- Make sure event is tracked when the button is clicked.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #364290 (closed)
Edited by Rahul Chanila