Skip to content

Use dashboard limit on storage alerts

What does this MR do and why?

This implements https://gitlab.com/gitlab-org/gitlab/-/issues/431395

This MR is dependent on !138331 (merged)

Screenshots or screen recordings

Before After After with purchased storage
limit_alert_before limit_alert_after limit_alert_after_w_purchased_storage

How to set up and validate locally

Use these commands in rails console:

  1. Gitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)
  2. Gitlab::CurrentSettings.update!(enforce_namespace_storage_limit: true)
  3. Plan.free.actual_limits.update!(notification_limit: 5*1024)
  4. Plan.free.actual_limits.update!(enforcement_limit: 10*1024)
  5. Plan.free.actual_limits.update!(storage_size_limit: 5*1024)
  6. Project.find(29).statistics.update(repository_size: 12.gigabytes)
    1. Sidekiq.redis(&:flushdb)
    2. Namespaces::ScheduleAggregationWorker.perform_sync(89)
    3. Namespaces::RootStatisticsWorker.perform_sync(89)
  7. Feature.enable(:namespace_storage_limit_show_preenforcement_banner, Group.find(89))
  8. Feature.enable(:namespace_storage_limit, Group.find(89))

Check the number in the banner is storage_size_limit and not enforcement_limit.

MR acceptance checklist

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

Edited by Sheldon Led

Merge request reports

Loading