Skip to content

Adds confirmation prompt to container image repository delete modal

What does this MR do and why?

Adds an additional layer of safety before deletion of container images by adding a confirmation prompt when attempting to delete image repository.

Implements !66612 (merged) on container registry list page.

The input prompt is changed from project name to the following:

Repository full path Confirmation
mygroup/myproject (base repository) myproject
mygroup/myproject/foo (sub repository) foo
mygroup/myproject/foo/bar (sub repository) foo/bar

Screenshots or screen recordings

Screenshot_2023-04-15_at_12.40.32_am

Screenshot_2023-04-15_at_12.40.45_am

Screenshot_2023-04-15_at_12.41.15_am

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. In the terminal, run these commands to push images to test base repository & sub repository
    $ docker pull hello-world
    $ docker tag hello-world 127.0.0.1:5000/<project-path> && docker push 127.0.0.1:5000/<project-path>
    $ docker tag hello-world 127.0.0.1:5000/<project-path>/testing && docker push 127.0.0.1:5000/<project-path>/testing
    $ docker tag hello-world 127.0.0.1:5000/<project-path>/testing/hello-world && docker push 127.0.0.1:5000/<project-path>/testing/hello-world
  3. Visit the container registry list page for the project
  4. Click the delete icon to show the modal & confirm it shows the input prompt
  5. click through the image repository & confirm the modal works similarly

MR acceptance checklist

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

Fixes #406751 (closed)

Edited by Rahul Chanila

Merge request reports

Loading