Fix plan limits for different types of enforcement alert
What does this MR do and why?
This is tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/412991. We need to make sure the actual_size_limit method returns the actual limit depending on the enforcement type:
This method is used in a few places, but the visible places are the storage banner and the usage overview. The fix on usage overview is going to be tackled in https://gitlab.com/gitlab-org/gitlab/-/issues/413759 once this MR gets merged.
Screenshots or screen recordings
Project Enforcement
No change expected
| Before | After |
|---|---|
![]() |
![]() |
Namespace Enforcement
The limit in the banner is the correct one, not the project enforcement one.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Please refer to this MR's steps to validate to follow all the steps and see the different limits being displayed.
For the screenshots I had:
pry(main)> Group.find(75).actual_plan.actual_limits.storage_size_limit
=> 500 # Megabytes
pry(main)> Gitlab::CurrentSettings.repository_size_limit / 1.megabyte
=> 1000
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 Sheldon Led



