Check if Gitlab API is supported when using sub-repositories endpoint
What does this MR do and why?
Part of #388537 (closed).
In !110664 (merged), we added the use of the new sub-repositories endpoint behind a feature flag.
From discussions and investigations such as in https://gitlab.com/gitlab-org/gitlab/-/issues/360664#note_1298806539, it seems that instead of just checking for Gitlab.com?
, we should also check ContainerRegistry::GitlabApiClient.supports_gitlab_api?
(where Gitlab.com
is already checked).
How to set up and validate locally
When calling Namespace#first_project_with_container_registry_tags
, if ContainerRegistry::GitlabApiClient.supports_gitlab_api?
is true then the new sub-repositories endpoint should be called, otherwise the existing query is called.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #388537 (closed)