Skip to content

Handle invalid repositories in Docker Registry

Valery Sizov requested to merge 196158-fix-tags-nil into master

What does this MR do?

In some cases, there are no tags in a repository, however, the repository itself exists. I could not create such a state using API but somehow it's possible. I could only remove all the tags manually in storage for a particular repository to reproduce this error. This MR does the same as what we do in ContainerRepository#tags method so it's also consistent.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #196158 (closed)

Edited by Valery Sizov

Merge request reports