Skip to content

Show cost factored size on project page

What does this MR do and why?

It shows the cost factored storage size in the project's page (i.e. when the project is forked from another project, it uses less storage size).

The spec disables RSpec/FactoryBot/AvoidCreate in a few places, where we have to use full project to have access to the statistics and to be able to fork projects (more details in the comments below).

Screenshots or screen recordings

Before After
Screenshot_2023-10-16_at_11.24.48 Screenshot_2023-10-16_at_11.21.08

How to set up and validate locally

  • In bin/rails console: Feature.enable(:namespace_storage_limit) and Feature.enable(: display_cost_factored_storage_size_on_project_pages)
  • (as root) Update the cost factor to 0.1 in /admin/application_settings/namespace_storage
  • Fork a public project as private project in a namespace
  • Navigate to the newly forked project's page
  • Notice the project's storage a bit below the project's title

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416098

Edited by Ammar Alakkad

Merge request reports