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

  • Software Developer
  • DevOps Engineer
  • Systems Administrator

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:

  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 for details about how to remove images."

Screen_Shot_2019-08-07_at_3.16.04_PM

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
  • Transferring groups
  • Redirects when changing paths
  • API endpoint for group-level view of the container registry
Edited Sep 25, 2019 by Tim Rizzi
Assignee Loading
Time tracking Loading