Hide storage limits copy when limit is 0
What does this MR do and why?
This hides confusing copy when there's no limits applied. Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/425109
Screenshots or screen recordings
How to set up and validate locally
The UI changed is accessed by https://gdk.test:3443/groups/<my-group>/-/usage_quotas#storage-quota-tab
- Replace
my-group
with your group id😉
Reproducing steps for a group in a Self-Managed instance
Click to expand
- Make sure you're NOT simulating SaaS in your GDK
- Access your Group Usage Quotas Page
- Make sure that the message is not appearing (
This namespace has 0 B of storage. How are limits applied?
)
Project Storage Limits
Reproducing steps for a group inClick to expand
- Make sure you ARE simulating SaaS in your GDK
- In
rails console
, add a repository size limit:Gitlab::CurrentSettings.update!(repository_size_limit: 10.gigabytes)
- Go back to the browser and check the Usage Quotas page:
- Note the texts:
Projects under this namespace have 10.0 GiB of storage. How are limits applied?
- Inside the left-hand side card:
10.0 GiB Storage per project included in Free subscription
- Note the texts:
- In
rails console
, remove the repository size limit:Gitlab::CurrentSettings.update!(repository_size_limit: 0)
- Go back to the browser and make sure the 2 texts disappeared.
Namespace Storage Limits
Reproducing steps for a group inClick to expand
- Make sure you ARE simulating SaaS in your GDK
- Enable the setting that tells your GitLab instance that it has the
purchase storage
featureGitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)
- Enable the setting that tells your GitLab instance that it is enforcing
namespace limits
Gitlab::CurrentSettings.update!(enforce_namespace_storage_limit: true)
- Enable the
namespace limits
for your group (replace the command below by your group id)Feature.enable(:namespace_storage_limit, Group.find(89))
- Add a limit to the
Free
Plan:Plan.free.actual_limits.update!(storage_size_limit: 5 * 1024)
- Go back to the browser and check the Usage Quotas page. Note the text:
This namespace has 5.0 GiB of storage. How are limits applied?
- Remove the plan limit:
Plan.free.actual_limits.update!(storage_size_limit: 0)
- Go back to the browser and note that the text disappeared:
- Also, the cards displayed are now the same as the
Project Limits
cards.
- Also, the cards displayed are now the same as the
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