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](https://www.youtube.com/watch?v=WM-TS-mbw30&feature=youtu.be) However, for groups we do not do the same check and prevent users from breaking their container registry. ### Intended users - [Software Developer](https://design.gitlab.com/getting-started/personas#persona-sasha) - [DevOps Engineer](https://design.gitlab.com/getting-started/personas#persona-devon) - [Systems Administrator](https://design.gitlab.com/getting-started/personas#persona-sidney) ### Further details - More details about renaming/transferring groups [here](https://gitlab.com/help/user/group/index#transferring-groups) - GitLab does provide [redirect for path changes](https://docs.gitlab.com/ee/user/project/index.html#redirects-when-changing-repository-paths), 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: 1. navigating to their group's settings > General page. 2. Expanding the Path, transfer, remove section. 3. Entering a new name under Change group path. 4. 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](https://docs.gitlab.com/ee/api/container_registry.html#delete-repository-tags-in-bulk) for details about how to remove images." ![Screen_Shot_2019-08-07_at_3.16.04_PM](/uploads/402e59607aaf9096adab214b96f12a4c/Screen_Shot_2019-08-07_at_3.16.04_PM.png) ### 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. ### Links / references - [Issue to allow updating group/project path](https://gitlab.com/gitlab-org/gitlab-ce/issues/57782) - [Transferring groups](https://gitlab.com/help/user/group/index#transferring-groups) - [Redirects when changing paths](https://docs.gitlab.com/ee/user/project/index.html#redirects-when-changing-repository-paths) - [API endpoint for group-level view of the container registry](https://gitlab.com/gitlab-org/gitlab-ce/issues/26866)
issue