Remove Gitlab.com check when using GitlabApiClient#deduplicated_size
What does this MR do and why?
In this MR, we remove the Gitlab.com
check in places where GitlabApiClient#deduplicated_size
is used, specifically:
Project#container_repositories_size
Namespace#container_repositories_size
The removal of the checks allows self-managed who have migrated to also use this feature.
Now, as long as the client supports the Gitlab API, we then call GitlabAPIClient#repository details
.
The migration is also done now on Gitlab.com, so we can remove the checks for status and creation dates.
MR acceptance checklist
How to set up and validate locally
- With a rails console and the container registry running, verify that you have the Gitlab API available for you.
ContainerRegistry::GitlabApiClient.supports_gitlab_api?
# => true
- Once the Gitlab API is supported, we want to try the 2 new methods that are now available to us. Without this MR, these methods would return
nil
. With our changes, it should now return the proper size. Note, you might have different IDs in your local😊
Project.find(28).container_repositories_size
# => 188861858
Project.find(28).namespace.container_repositories_size
# => 188861858
Namespace.find(89).container_repositories_size
# => 188861858
Related to #457158 (closed)
Edited by Adie (she/her)