Skip to content

Draft: Remove legacy check for project root container repositories

Jaime Martinez requested to merge remove-legacy-root-repo-check into master

What does this MR do and why?

The method has_root_container_repository_tags existed for backward compatibility reasons where we did not store "root" project repositories in the container_repositories table.

  ##
  # This method is here because of support for legacy container repository
  # which has exactly the same path like project does, but which might not be
  # persisted in `container_repositories` table.
  #

However, since we have completed the Container Registry Migration on GitLab.com, I believe there is no longer need for this check as all container_repositories must exist now.

This is a problem when renaming a namespace with large number of projects, as we construct a temporary entity and check for tags: ContainerRepository.build_root_repository(self).has_tags?. This in turn makes a request to the Container Registry /tags/list endpoint for each repository. So this can cause timeouts and some 500s as reported in https://gitlab.com/gitlab-com/ops-sub-department/section-ops-request-for-help/-/issues/56. See this comment for more details.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jaime Martinez

Merge request reports