Better support for connection errors with the Container registry
Summary
During a recent outage: gitlab-com/gl-infra/production#2381 (closed) it was brought up that in various places in the GitLab UI, we will show incorrect information. If the API calls to GitLab fail, we do not indicate a problem with the Container Registry, but instead return nil values. This is a serious problem as scripts may rely on the ability to find tags to determine if an object needs to be built. This can lead to unnecessary rebuilds. It would appear that our API may not be properly returning a valid response to the user when the Container Registry is suffering a problem.
See the original comment in that issue here: gitlab-com/gl-infra/production#2381 (comment 375972108)
Steps to reproduce
- Intentionally shutdown the Container Registry service
- Perform various operations against the Container Registry:
- Make an API call to find an image
- Tell a CI job to pull an image
What is the current bug behavior?
The API will respond noting that the Docker image tag does not exist.
What is the expected correct behavior?
The API should return an error.
Proposal
Update the copy when an error due to the registry being unavailable occurs. This impacts both the API and the UI.
User interface
We are having trouble connecting to the Container Registry. Please try refreshing the page. If this error persists, please review the troubleshooting documentation.
API
We are having trouble connecting to the Container Registry. If this error persists, please review the troubleshooting documentation.