Persists container_registry_size and adds container_registry_size in storage_size
What does this MR do and why?
Persists container_registry_size and adds container_registry_size in storage_size
Ref: https://gitlab.com/gitlab-org/gitlab/-/issues/358389
Screenshots or screen recordings
How to set up and validate locally
Firstly, ensure you have a Namespace
with an associated RootStorageStatistics
:
namespace = Namespace.last
stats = namespace.root_storage_statistics
All Namespace should have an associated statistics record, but if not you can build one with:
stats = namespace.build_root_storage_statistics
Quick method:
-
Modify
Namespace#container_repositories_size
to return an integer, e.g.def container_repositories_size 35 end
-
Comment the feature_flag within
Namespace::RootStorageStatistics#attributes_for_container_registry_size
-
Test that the statistics get updated accordingly:
> stats.container_registry_size => 0 > stats.recalculate! > stats.container_registry_size => 35
Full integration method:
- Follow the Container Registry setup steps described in !83980 (merged)
- Perform step 2,3 of the
Quick method
above
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.
Edited by Suraj Tripathi