Delete only selected tags from the Container Registry
Problem to solve
/container_registry users can view and manage their images/tags. However, if an image has multiple tags, clicking delete on any of the tags deletes all tags with the same image id. This is due to a limitation with the Docker API, which does not allow for the deletion of a single tag. The issue has been raised with Docker, but has not been addressed in over two years.
This is problematic for users that expect to be able to delete a single tag and end up accidentally deleting multiple tags. Several users have suggested workarounds for this problem, but we have yet to incorporate any of them into the GitLab UI.
I've clicked 'delete' on line with
Update the container registry UI, to allow users to remove a single tag, without removing all tags with the same
- Since Docker distribution deletes all tags which point to same image, we can delete just one tag by pushing a different image into it and then deleting the tag.
- When the tag is the last tag for the image, do not apply the substitution, delete the actual image and not the dummy
- https://gitlab.com/gitlab-org/gitlab-ce/issues/24705 will give users the ability to select and remove multiple images/tags at once. As part of that change, it's important that only images/tags that are selected are removed.
- https://gitlab.com/gitlab-org/gitlab-ce/issues/62559 added a warning modal, which can be removed if we address this issue.
Permissions and Security
- Developers, maintainers, and owners will all have the ability to untag multiple images/tags.
- For the Container Registry API we do not allow developers to bulk delete images, but since they are manually selecting the images, we can allow it.
- We need to test that the untagging behavior works as expected and that only items selected are removed.
What does success look like, and how can we measure that?
Success looks like we have resolved the core issue and users can begin to rely on the user interface for managing their Container Registry. Once resolved, we should see an increase in the amount of images that are untagged.
|Priority||Category||Metric||Aggregated by||SMAU Eligible?||Data available?|
|P1||Container Registry||# of page views of
|P1||Container Registry||# of images/tags deleted one at a time from the UI||
|P1||Container Registry||# of images/tags deleted in bulk from the UI||