Adds dependency_proxy_size to namespace statistics
What does this MR do and why?
Adds a new column to namespace_statistics
table for dependency_proxy_size
which will be used to hold the total storage size of DependencyProxy
related storage (Blobs
and Manifests
).
We need this column so that we can efficiently:
- display Dependency Proxy related storage size at the namespace level
- calculating and displaying the total Dependency Proxy storage size at the root namespace level
Refs https://gitlab.com/gitlab-org/gitlab/-/issues/348172
Migration details
bin/rails db:migrate
== 20220119141407 AddDependencyProxySizeToNamespaceStatistics: migrating ======
-- add_column(:namespace_statistics, :dependency_proxy_size, :bigint, {:default=>0, :null=>false})
-> 0.0200s
== 20220119141407 AddDependencyProxySizeToNamespaceStatistics: migrated (0.0201s)
bin/rails db:rollback
== 20220119141407 AddDependencyProxySizeToNamespaceStatistics: reverting ======
-- remove_column(:namespace_statistics, :dependency_proxy_size, :bigint, {:default=>0, :null=>false})
-> 0.0040s
== 20220119141407 AddDependencyProxySizeToNamespaceStatistics: reverted (0.0066s)
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 João Alexandre Cunha