Draft: Cost Factors for Forked Projects for Namespace Storage PoC (Draft 1)
What does this MR do and why?
PoC for https://gitlab.com/gitlab-org/gitlab/-/issues/378995
This is a proof of concept. The code and UI in this MR is a sketch of ideas and could be improved upon for a final product.
Projects which are forks of other projects will have their total storage size multiplied by 0.008
for purposes of calculating namespace storage usage. The root namespace storage statistics (Namespace::RootStorageStatistics
) will store both the actual size of all storage as well as the total size taking into account the cost factor for forks; so we will have both values to use as necessary. When we check if a namespace is over the storage size limit (in Namespaces::Storage::RootSize
), we will use the cost factored storage size rather than the actual storage size.
There are also various changes to the UI to display the actual sizes and cost factored sizes to the user.
Screenshots or screen recordings
Personal Namespace Usage Quotas Page
There is a new Namespace Storage Consumption column in the table. Kyle Smith / GitLab Copy
is a fork of a project and thus consumes less namespace storage - note the discrepancy between Namespace Storage Consumption and Total for this project.
The total namespace storage used is the sum of the Namespace Storage Consumption columns, not the Total columns.
Group Namespace Usage Quotas Page
This group does not have any projects that are forks.
Popup Text / Tooltips
This is just one idea. There may be a better way to do this, such as tool tips under just the column headings.
Forked Project Usage Quotas Page
Notice the message about how much namespace storage is consumed below the Usage breakdown bar graph.
Project Usage Quotas Page
This is the usage quotas page for a project that is not a fork. There are no changes here from what we have today.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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.