Check for docker images before renaming group
Problem to solve
The GitLab Container Registry allows users to build, push and pull Docker images/tags using GitLab. However, since GitLab uses the Docker API, we run into problems where updating a group or projects path will break the connection to Docker.
We've solved this problem for projects by checking to see if the project has any images/tags before allowing the user to change the project name/path. If there are images/tags, the user is alerted that they cannot rename their project because registry tags exist. Example video
However, for groups we do not do the same check and prevent users from breaking their container registry.
Intended users
Further details
- More details about renaming/transferring groups here
- GitLab does provide redirect for path changes, but that does not apply to the container registry. In order to address the core issue of allowing users to move groups/projects, we will need to do something similar.
Proposal
When a user attempts to rename their group by:
- navigating to their group's settings > General page.
- Expanding the Path, transfer, remove section.
- Entering a new name under Change group path.
- Clicking Change group path.
Check to see if there are any images/tags within the group and prevent the user from making the change with the same warning modal we use for projects.
**Copy: ** "Cannot update the path because it contains images in the container registry. Click here for details about how to remove images."
Permissions and Security
There are no permissions updates required for this issue.
Documentation
Testing
- Test groups and subgroups
What does success look like, and how can we measure that?
Success looks like users are warned before updating their group path and avoid disabling their container registry.