External container registry not displaying containers with 3 layers of image names
Summary
According to the empty registry page GitLab should support up to 3 levels of image names:
However this does not work when using an external repository.
As reported by customer:
Let's say I have a user named chris who have a project chris-project. If I push an image ':/chris/chris-project', I can see it listed in on the web page '/chris/chris-project/container_registry' but, if I push an image with a longer name like ':/chris/chris-project/httpd', I don't see this image. However the image can be seen in the catalog of the external registry itself and I can even pull the image from the gitlab server so it seems to be only a "display" issue.
Steps to reproduce
- Deploy and run an external registry, easiest method is the docker container here
- Configure GitLab to point to registry in
/etc/gitlab/gitlab.rb
(add hostname to /etc/hosts) then runsudo gitlab-ctl reconfigure
:
registry_external_url 'https://registry.gitlab.example.com'
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "registry.gitlab.example.com"
gitlab_rails['registry_port'] = "5000"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
- Pull a container, login, tag with 3 layers of image names and push to external repository:
docker pull ubuntu
docker login registry.gitlab.example.com:5000
docker tag ubuntu registry.gitlab.example.com:5000/project_name/sub_group/optional_third_layer:tag
docker push registry.gitlab.example.com:5000/project_name/sub_group/optional_third_layer:tag
- Go to registry page under project, the container should be displayed but it is not displaying.
What is the current bug behavior?
Containers with three image layers in tag do not display
What is the expected correct behavior?
Should display all containers
Relevant logs and/or screenshots
Log output available under https://gitlab.zendesk.com/agent/tickets/83929 (internal) though there are no obvious errors.
Results of GitLab environment info
Tested on 9.5.9 and 10.0.1
Possible fixes
Appears to be a frontend issue (unconfirmed).