Inform the user that removing the last tag of an image, it will remove the image as a whole.
Problem to solve
The GitLab Container Registry allows users to build, publish and share Docker images using the Docker client or GitLab pipelines. Users can remove images using the Container Registry UI or the Container Registry API.
Before I describe the problem I wanted to give a quick refresher on a few Docker terms:
- Tag: Docker tags convey useful information about a specific image version/variant. They are aliases to the ID of your image which often look like this: f1477ec11d12. It’s just a way of referring to your image. A good analogy is how Git tags refer to a particular commit in your history.
- Image: An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization.
- Container: A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI.
In milestone 12.3, we resolved an issue with Docker, where untagging an image would remove all tags sharing the same Image_ID. We accomplished this by changing the logic so that when a user removes a given tag, we push the tag to a new image and delete THAT image.
The problem is that when we remove the last tag of an image, it removes the entire image. We need to warn users of this behavior.
Intended users
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
Further details
Proposal
As part of the modal experience, we add a second confirmation if the user is deleting the last tag, confirming that they wish to remove the image as a whole as part of removing the last tag(s).
Copy
- If the users selects multiple tags for removal at the same time AND one of them happens to be the last tag, we will serve two warning messages:
- The first:
You are about to remove <b>%{count}</b> tags. Are you sure?
- The second:
You are about to remove <b>%{title}</b>. Since this is the only tag for this image, this will remove the tag and image. Are you sure?
- The first:
- If the user selects only one tag and it is the last tag of a given image:
You are about to remove <b>%{title}</b>. Since this is the only tag for this image, this will remove the tag and image. Are you sure?
Permissions and Security
-There are no permissions changes required for this issue
Documentation
-There are no documentation changes required for this issue
What does success look like, and how can we measure that?
- Success looks like we heed the advice of our product designer @icamacho and "Always warn users of destructive actions"