Move Storage App to Core: namespace vue app
What does this MR do and why?
This implements Move storage app to CE (#371824 - closed)
This is the second MR moves the storage
app in the Usage Quotas page to the Core
codebase, so we can make it available for all editions.
MR Cadence
Description | MR |
---|---|
Move :read_usage_quotas policy to Core app |
!103021 (merged) |
Create Usage Quotas route/controller/view in Core | !102906 (merged) |
Add menu entry on sidebar | !106083 (merged) |
Create usage quotas Vue app | !107359 (merged) |
Reorganize Backend code for storage tab |
!109806 (merged) |
Move Storage App to Core: initial frontend | !108332 (closed) |
Move storage app to Core: namespace vue app |
|
What's being changed here
The diff
tab looks overwhelming but most of if are directory moves:
Before | After |
---|---|
CE Directory: /app
|
CE Directory: /app
|
EE Directory: /ee/app
|
EE Directory: /ee/app
|
Most files were just moved but a few had changes in their content. Here I'll try to summarize the diff:
-
~/usage_quotas/components/usage_quotas_app.vue
: The new View is now rendering theNamespaceStorageApp
-
~/usage_quotas/storage/components/namespace_storage_app.vue
: changed to conditionally render ee features -
~/usage_quotas/storage/components/project_list.vue
: updated import path -
~/usage_quotas/storage/components/storage_statistics_card.vue
: updated import path -
~/usage_quotas/storage/components/storage_usage_statistics.vue
: This is the CE version of this component. We basically removed all references to purchase/limits (SaaS-only feature) and only show the stats. We useee_else_ce
strategy to determine which version of this component to import -
~/usage_quotas/storage/queries/namespace_storage.query.graphql
: Same as above, we removed any SaaS-only attribute and useee_else_ce
strategy to determine which version of this component to import -
~/usage_quotas/storage/constants.js
: moved the remaining constants that are used inCE
-
~/usage_quotas/storage/utils.js
: moved the remaining constants that are used inCE
-
~/usage_quotas/index.js
: removed not used flag and reorganize provide data to similar order as the backend helper method -
ee/usage_quotas/seats/components/subscription_seats.vue
: updated import now thatsearch_and_sort_bar
has been moved to CE -
ee/usage_quotas/storage/components/storage_inline_alert.vue
: updated import -
ee/usage_quotas/storage/components/storage_usage_statistics.vue
: updated imports -
ee/usage_quotas/storage/queries/namespace_storage.query.graphql
: Since the query names have to be unique I'm giving this one a different name -
ee/usage_quotas/storage/constants.js
: Moving all constants to CE except the EE-only ones -
ee/usage_quotas/storage/init_namespace_storage.js
: this is the legacy app loader. Updated import -
ee/usage_quotas/storage/utils.js
: Moving all constants to CE except the EE-only ones -
ee/spec/frontend/usage_quotas/**_spec.js
: Updated imports. I tried moving the specs to CE (you can check out the code here or locally by pullingled/371824-move-storage-app-core-namespace-with-tests
) but failed miserably😅 The tests are heavily EE specific. For now we can leave the tests as is, because it is testing the CE code, however we need to add tests for the CE scenario. I've created #390951 to cater this piece of work
Screenshots or screen recordings
More details on each screenshot in the issue #371824 (closed)
Enterprise Edition | SaaS | EE Unlicensed | Community Edition |
---|---|---|---|
How to set up and validate locally
We need to validate this in 4 scenarios:
- GitLab EE: by having a test license in your GDK.
- GitLab SaaS: setup a license like the above and simulate SaaS
- GitLab EE Unlicensed: by removing your license in http://gdk.test:3000/admin/subscription
-
GitLab CE: by executing
export FOSS_ONLY=1
gdk restart
- 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: 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.
-
I have evaluated the MR acceptance checklist for this MR.