Skip to content

Finish moving namespace storage to CE

What does this MR do and why?

This is the eighth of a series of MRs that aim to migrate the Namespace Storage Vue App to CE so that this view is available for all GitLab Editions and Distributions. Related to: Move storage app to CE (#371824 - closed)

Here we finish migrating NamespaceStorageApp, deleting the file in EE and only using the vue app in CE. Note that the view isn't still available even if the FF is on, this will be done in !140209 (closed)

  • Finish the migration of NamespaceStorageApp, move its stories to CE too.
    • Migrated all the tests to CE except the ones testing EE behavior.
    • In order to reduce EE logic in CE I moved the initialSortBy logic to be injected. This way it's easier to override in EE.
  • Migrate the remaining of the util.js in EE to CE

MR Cadence

Description MR
Introduce NamespaceStorageApp in core !138689 (merged)
Create StorageUsageStatistics in CE !139111 (merged)
Move DependencyProxyUsage to CE !139248 (merged)
Move ContainerRegistryUsage to CE !139252 (merged)
Move Usage Quotas test fixtures to CE !142067 (merged)
Move SearchAndSortBar to CE !139434 (merged)
Move ProjectList to CE !139449 (merged)
Finish moving NamespaceStorageApp to CE 👈 you're here
Replace placeholder with NamespaceStorageApp !140209 (closed)

Screenshots or screen recordings

All the changes here are behind a Feature Flag: usage_quotas_for_all_editions, so there should be no UI or behavior change for now.

How to set up and validate locally

We need to validate this in 4 scenarios:

  1. GitLab EE Unlicensed: this is probably how your GDK is right now. If you have a license in your GDK, remove it in https://gdk.test:3443/admin/subscription
  2. GitLab EE: by having a test license in your GDK.
  3. GitLab SaaS: setup a license like the above and simulate SaaS
  4. GitLab CE: by executing
    1. export FOSS_ONLY=1
    2. gdk restart
    3. Tanuki gdk website icon (the one in the browser tab) should be blue, then you're in CE

Now go to any Group Usage Quotas: https://gdk.test:3443/groups/flightjs/-/usage_quotas and check if your local setup matches the expected behavior.

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

Expected behavior:

  • Expected behavior with Feature Flag on: Page loads a placeholder (storage_app_placeholder) for all the scenarios.
GitLab Distribution Expected behavior FF off
GitLab EE Unlicensed Renders a 404 page
GitLab EE Loads the page normally, hiding SaaS UI (e.g. the right hand side card in Namespace overview)
GitLab SaaS Page loads normally, like it is on master/GitLab.com
GitLab CE Renders a 404 page

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