Update Namespace.actual_repository_size_limit
What does this MR do and why?
In this MR we're introducing plan_limits.repository_size
as part of Namespace.actual_repository_size_limit
so that we can achieve our main goal in https://gitlab.com/groups/gitlab-org/-/epics/14212
The hierarchy is as follows: projects.repository_size_limit > namespaces.repository_size_limit > plan_limits.repository_size > application_settings.repository_size_limit
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/502227+
- New values for
plan_limits.repository_size
being discussed in https://gitlab.com/gitlab-org/gitlab/-/issues/502217+
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
repository_size_limit
Instance level Ultimate Group | Free Group |
---|---|
![]() |
![]() |
repository_size_limit
Plan level Here, the Ultimate
plan has a 500GiB repository_size_limit
limit
Ultimate Group | Free Group |
---|---|
![]() |
![]() |
repository_size_limit
Group level Here we only show the Free
plan group where before they'd have the 10GiB instance limit and after we had overridden the instance limit with a bigger one, only for their group
Free Group before | Free Group after |
---|---|
![]() |
![]() |
How to set up and validate locally
For this change we'll test repository_size_limit
in 3 levels: Instance, Plan, Group:
- For all levels you'll need to:
- Simulate SaaS GitLab.com and have at least one group with the Ultimate Plan (watch the video for visual instructions)
- Enable this setting in
rails console
:Gitlab::CurrentSettings.update!(automatic_purchased_storage_allocation: true)
- Make note of your Group with
Ultimate
plan and have anotherFree
plan group for comparison
-
Instance: This one is how it works for most groups in GitLab.com
Gitlab::CurrentSettings.update!(repository_size_limit: 10.gigabytes)
- Now go to your Group Usage Quotas Page, choose the storage tab:
https://gdk.test:3443/groups/<your-group>/-/usage_quotas#storage-quota-tab
- Make sure sure you see the 10GiB limit in the UI, like in the screenshots
- Alternatively you can check in
rails console
:Group.find(<group-id>).actual_repository_size_limit
-
Plan: This is the new logic being added in this MR
Plan.find_by_name('ultimate').actual_limits.update!(repository_size: 500.gigabytes)
Feature.enable(:plan_limits_repository_size)
rails cache:clear
- Now go to Usage Quotas Page and compare both groups and what limit they have
- Alternatively you can check in
rails console
:Group.find(<group-id>).actual_repository_size_limit
-
Group: This is also currently in production, we're only asserting no regression here, like in the instance case
Group.find(<group-id>).update(repository_size_limit: 25.gigabytes)
rails cache:clear
- Now go to Usage Quotas Page and compare both groups and what limit they have
- Alternatively you can check in
rails console
:Group.find(<group-id>).actual_repository_size_limit
Merge request reports
Activity
assigned to @sheldonled
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels
- A deleted user
added backend label
1 Warning The master pipeline status page reported failures in If these jobs fail in your merge request with the same errors, then they are not caused by your changes.
Please check for any on-going incidents in the incident issue tracker or in the#master-broken
Slack channel.1 Message CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Category Reviewer Maintainer backend @shreyasagarwal
(UTC+1, 1 hour ahead of author)
@manojmj
(UTC+1, 1 hour ahead of author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger- Resolved by 🤖 GitLab Bot 🤖
Proper labels assigned to this merge request. Please ignore me.
@sheldonled
- please see the following guidance and update this merge request.1 Error Please add typebug typefeature, or typemaintenance label to this merge request. Edited by 🤖 GitLab Bot 🤖
added featureconsolidation typefeature labels
added 733 commits
-
49fb7bb9...0cb9dd1e - 732 commits from branch
master
- 493bb050 - Update Namespace.actual_repository_size_limit
-
49fb7bb9...0cb9dd1e - 732 commits from branch
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for b7b00931expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 82 | 0 | 2 | 0 | 84 | ✅ | | Plan | 146 | 0 | 0 | 0 | 146 | ✅ | | Create | 224 | 0 | 4 | 0 | 228 | ✅ | | Govern | 114 | 0 | 4 | 0 | 118 | ✅ | | Package | 48 | 0 | 0 | 0 | 48 | ✅ | | Secure | 8 | 0 | 0 | 0 | 8 | ✅ | | Monitor | 16 | 0 | 0 | 0 | 16 | ✅ | | Data Stores | 42 | 0 | 0 | 0 | 42 | ✅ | | Release | 10 | 0 | 0 | 0 | 10 | ✅ | | Fulfillment | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 2 | 0 | 0 | 0 | 2 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 696 | 0 | 10 | 0 | 706 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-test-on-cng:
test report for b7b00931expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Create | 140 | 0 | 20 | 0 | 160 | ✅ | | Plan | 86 | 0 | 8 | 0 | 94 | ✅ | | Verify | 50 | 0 | 15 | 0 | 65 | ✅ | | Package | 24 | 0 | 14 | 0 | 38 | ✅ | | Monitor | 8 | 0 | 12 | 0 | 20 | ✅ | | Govern | 84 | 0 | 9 | 3 | 93 | ✅ | | Manage | 1 | 0 | 9 | 0 | 10 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Fulfillment | 2 | 0 | 7 | 0 | 9 | ✅ | | Data Stores | 29 | 0 | 14 | 0 | 43 | ✅ | | Secure | 1 | 0 | 6 | 0 | 7 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Release | 5 | 0 | 1 | 0 | 6 | ✅ | | Configure | 0 | 0 | 3 | 0 | 3 | ➖ | | Ai-powered | 0 | 0 | 2 | 0 | 2 | ➖ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 432 | 0 | 123 | 3 | 555 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
added grouputilization label
changed milestone to %17.6
added devopsfulfillment sectionfulfillment labels
added 1 commit
- e211d38e - Update Namespace.actual_repository_size_limit method
- A deleted user
added feature flag label
- Resolved by Sylvester Chin
@bhrai would you be available to review this MR?
Thanks in advance
requested review from @bhrai
- Resolved by Bishwa Hang Rai
- Resolved by Bishwa Hang Rai
requested review from @schin1
added pipeline:mr-approved label
reset approvals from @bhrai by pushing to the branch
reset approvals from @bhrai by pushing to the branch
- Resolved by Sylvester Chin
- Resolved by Sylvester Chin
- Resolved by Sylvester Chin
- Resolved by Sylvester Chin
started a merge train
mentioned in commit 96f1a39b
mentioned in incident gitlab-org/quality/engineering-productivity/master-broken-incidents#9352 (closed)
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-production label and removed workflowproduction label
added releasedcandidate label
mentioned in merge request !173854 (merged)
added releasedpublished label and removed releasedcandidate label
mentioned in issue gitlab-org/quality/triage-reports#22028