Create Group Usage Quotas view in Core

What does this MR do and why?

This MR creates an endpoint and a view for the Usage Quotas page in the Core codebase, so that Usage Quotas is available for Community Edition (&7176 (closed))

Implements: #371820 (closed)

MR Cadence

Description MR
Move :read_usage_quotas policy to Core app !103021 (merged)
Create Usage Quotas route/controller/view in Core 👈 you're here
Add menu entry on sidebar !106083 (merged)

Screenshots or screen recordings

EE and SaaS

FF off FF on
usage_quotas_ee_saas_groups_ff-off usage_quotas_ee_saas_groups_ff-on

EE unlicensed

FF off FF on
usage_quotas_ee_unlicensed_groups_ff-off usage_quotas_ee_unlicensed_groups_ff-on

CE

export FOSS_ONLY=1 && gdk restart
FF off FF on
usage_quotas_ce_groups_ff-off usage_quotas_ce_groups_ff-on

How to set up and validate locally

We need to validate this in 4 scenarios:

  1. GitLab EE: by having a test license in your GDK.
  2. GitLab SaaS: setup a license like the above and simulate SaaS
  3. GitLab EE Unlicensed: by removing your license in http://gdk.test:3000/admin/subscription
  4. GitLab CE: by executing
    1. export FOSS_ONLY=1
    2. gdk restart

Now go to any Group Usage Quotas: http://gdk.test:3000/groups/flightjs/-/usage_quotas and check if your local setup matches the screenshots.

  • To enable the FF: Feature.enable(:usage_quotas_for_all_editions)
  • To disable the FF: Feature.enable(:usage_quotas_for_all_editions)

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