Skip to content

Only show project limits alert on affected project

What does this MR do and why?

This is to address a customer feedback in #451888 (closed)

You can get more context around it in this thread: #451888 (comment 1830750417)

With this MR we now only show project limits alert on affected projects

Hides over storage limit alerts for projects under limits, and for the group, except if in the group Usage Quotas.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
150017_before 150017_after

How to set up and validate locally

Make sure your GDK has these settings:

  1. Gitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)
  2. Gitlab::CurrentSettings.update!(repository_size_limit: 10.gigabytes)

Now Let's setup a group and projects to work with:

  1. Create or choose a group to work on. Make note of its id, e.g.: 147
  2. Create 2 projects under this group. Make note of their ids, e.g.: 45 and 46
  3. Now make one of these projects go over the storage limit
    1. Project.find(45).statistics.update(repository_size: 12.gigabytes)
  4. Propagate this data to the group:
    1. Sidekiq.redis(&:flushdb)
    2. Namespaces::ScheduleAggregationWorker.perform_sync(147)
    3. Namespaces::RootStatisticsWorker.perform_sync(147)
  5. Navigate in your GDK and make sure it matches the screen recordings
Edited by Sheldon Led

Merge request reports