Display Cost Factored Storage Sizes on Project Usage Quotas Page
What does this MR do and why?
It displays the cost factored storage size statistics on the project's usage quotas page.
When display_cost_factored_storage_size_on_project_pages
feature flag is enabled, we fetch the cost factored storage sizes and show them to the users.
Note: I opted to have two GraphQL queries for this change and based feature flag decide which one we use.
The new query has the same structure as the original one except it aliases all costFactored*
types to the original type name without costFactored
prefix, this way the frontend would just works without much changes or additional complexity.
It might not be recommended to use this method, but I think it's justified in this case since the costFactored*
types are EE only, and having them in a conditional @include
will break the FOSS version.
MR | Description | Status |
---|---|---|
!136867 (merged) | Duplicate project_storage query to EE | ![]() |
!134758 (merged) | Add cost_factored query to both CE and EE and load it behind FF | ![]() |
Upcoming | Clean-up feature flag, and move cost_factored properties to the EE version of project_storage query | ![]() |
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- In
bin/rails console
runFeature.enable(:display_cost_factored_storage_size_on_project_pages)
- As root, navigate to /admin/application_settings/namespace_storage and set the cost factor to something less than 1 (e.g. 0.3) and save
- In local gitlab, fork a public project to a private fork
- Navigate to the forked project > Settings > Usage Quotas
- Observe the storage size displayed is less than original repo's storage
- Try disable the feature flag in step 1 and refresh the page, the storage size in the forked project should match the original repo
- To run the frontend tests, make sure to generate the fixtures first
bin/rspec ee/spec/frontend/fixtures/projects.rb
- In case the storage didn't get updated, click the "Recalculate repository usage" button on the project's usage quotas 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #416097
Merge request reports
Activity
changed milestone to %16.6
added frontend grouputilization sectionfulfillment labels
assigned to @aalakkad
added typefeature label
added devopsfulfillment label
- A deleted user
added backend feature flag labels
- Resolved by Ammar Alakkad
- Resolved by Ammar Alakkad
- Resolved by Ammar Alakkad
- Resolved by Ammar Alakkad
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@d2857489
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 4be917f8expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Verify | 31 | 0 | 0 | 0 | 31 | ✅ | | Plan | 55 | 0 | 0 | 0 | 55 | ✅ | | Create | 48 | 0 | 9 | 0 | 57 | ✅ | | Data Stores | 23 | 0 | 0 | 0 | 23 | ✅ | | Govern | 57 | 0 | 0 | 0 | 57 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 222 | 0 | 12 | 0 | 234 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for bffeb887expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Fulfillment | 8 | 0 | 69 | 1 | 77 | ❗ | | Create | 130 | 0 | 21 | 0 | 151 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 138 | 0 | 90 | 1 | 228 | ❗ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-review-qa:
test report for 4be917f8expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Create | 8 | 0 | 2 | 0 | 10 | ✅ | | Data Stores | 2 | 0 | 0 | 0 | 2 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Govern | 3 | 0 | 0 | 0 | 3 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Plan | 3 | 0 | 1 | 0 | 4 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 20 | 0 | 5 | 0 | 25 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
Setting label(s) Category:Consumables Cost Management based on grouputilization.
added Category:Consumables Cost Management label
added 422 commits
-
3af8d3fe...a53d2c50 - 421 commits from branch
master
- 1cd4002a - Pass feature flag down to project storage app
-
3af8d3fe...a53d2c50 - 421 commits from branch
added 965 commits
-
1cd4002a...dbdd3384 - 956 commits from branch
master
- 47fe8ac0 - Add cost factored storage sizes to graphql project statistics type
- b1ea12bb - Add cost factored attributes to project statistics type
- 4cae841f - Add graphql documentation
- 1cdb1549 - Change double quotes to single in a spec
- 55da3127 - Pass feature flag down to project storage app
- 41566dc8 - Add fixture for cost factored project storage stats
- 1fba9ccc - Add cost factored stats to graphql query
- 9121e960 - Clean-up console from project_storage_app.vue
- 66111b76 - Test we use cost factored query on the frontend
Toggle commit list-
1cd4002a...dbdd3384 - 956 commits from branch
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
- Resolved by Ammar Alakkad
added 373 commits
-
3066c7b6...ad532cc9 - 368 commits from branch
master
- fb8c722a - Pass feature flag down to project storage app
- 9aa16ba8 - Add fixture for cost factored project storage stats
- cb3b1cbf - Add cost factored stats to GraphQL query
- ac768031 - Clean-up console from project_storage_app.vue
- 0f44bf27 - Test we use cost factored query on the frontend
Toggle commit list-
3066c7b6...ad532cc9 - 368 commits from branch
- Resolved by Kos Palchyk
added 5 commits
Toggle commit listadded 224 commits
-
45321039...88ef89e9 - 219 commits from branch
master
- 86f860f2 - Pass feature flag down to project storage app
- 2bf3b7d0 - Add cost factored stats GraphQL query
- 21c37280 - Add fixture for cost factored project storage stats
- 6d88fecd - Clean-up console from project_storage_app.vue
- 996abd68 - Test we use cost factored query on the frontend
Toggle commit list-
45321039...88ef89e9 - 219 commits from branch
- Resolved by Ammar Alakkad
requested review from @kpalchyk
added pipeline:mr-approved label
requested review from @vitallium
- Resolved by Vitaly Slobodin
- Resolved by Vitaly Slobodin
@aalakkad LGTM overall! Just one small suggestion. Back to you! Thanks!
- Resolved by Vitaly Slobodin
@aalakkad Some end-to-end (E2E) tests should run based on the stage label.
Please start the
trigger-omnibus-and-follow-up-e2e
job in theqa
stage and ensure tests in thefollow-up-e2e:package-and-test-ee
pipeline pass before this MR is merged. (E2E tests are computationally intensive and don't run automatically for every push/rebase, so we ask you to run this job manually at least once.)To run all E2E tests, apply the pipeline:run-all-e2e label and run a new pipeline.
E2E test jobs are allowed to fail due to flakiness. See current failures at the latest pipeline triage issue.
Once done, apply the
emoji on this comment.Team members only: for any questions or help, reach out on the internal
#quality
Slack channel.added pipeline:run-as-if-foss label
Generated bygitlab_quality-test_tooling
. Please share your feedback and suggestions.
Slow tests detected in this merge request, might be related with changed RSpec files.Job File Name Duration Expected duration #5491639524 spec/features/projects_spec.rb#L72
Project template create with project template behaves like creates from template is created from template 64.69 s < 50.13 s - A deleted user
added rspec:slow test detected label
added 1409 commits
-
bffeb887...269d3ab1 - 1403 commits from branch
master
- e927475a - Pass feature flag down to project storage app
- 8e1311a9 - Add cost factored stats GraphQL query
- e855e500 - Clean-up console from project_storage_app.vue
- 069b0144 - Test we use cost factored query on the frontend
- c28403ab - Move pushing the FF to before_action block
- 40517da6 - Duplicate cost factored project_storage gql to ee
Toggle commit list-
bffeb887...269d3ab1 - 1403 commits from branch
1 Warning da745068: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend @jmontal
(UTC-7, 10 hours behind author)
@eurie
(UTC-5, 8 hours behind author)
frontend @thomasrandolph
(UTC-7, 10 hours behind author)
@afontaine
(UTC-5, 8 hours behind author)
Please check reviewer's status!
Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits af0322ab and 4be917f8
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4.06 MB 4.06 MB - -0.0 % mainChunk 3.05 MB 3.05 MB - -0.0 % Significant Growth: 1Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.projects.usage_quotas 264.33 KB 271.64 KB +7.31 KB 2.8 %
Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.
Please consider pinging someone from the FE Foundations (
@leipert
,@markrian
,@ohoral
or@pgascouvaillancourt
) for review, if you are unsure about the size increase.Note: We do not have exact data for af0322ab. So we have used data from: 50ff9b8c.
The target commit was too new, so we used the latest commit from master we have info on.
It might help to rerun thebundle-size-review
job
This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.Please look at the full report for more details
Read more about how this report works.
Generated by
Danger- Resolved by Ammar Alakkad
@kpalchyk
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
- A deleted user
added Solutions development guidelines docsimprovement documentation maintenancerefactor typemaintenance labels and removed typefeature label
changed milestone to %16.7
added missed:16.6 label
removed docsimprovement label
removed development guidelines label
removed documentation label
removed Solutions label
mentioned in merge request !136867 (merged)
added 1 commit
- 22239f8f - Duplicate cost factored project_storage gql to ee
added 654 commits
-
22239f8f...33f4d15f - 648 commits from branch
master
- 6d4442b2 - Pass feature flag down to project storage app
- 18dd17d3 - Add cost factored stats GraphQL query
- f1edf611 - Clean-up console from project_storage_app.vue
- 5d7cd8f7 - Test we use cost factored query on the frontend
- dc9ed8ef - Move pushing the FF to before_action block
- da745068 - Duplicate cost factored project_storage gql to ee
Toggle commit list-
22239f8f...33f4d15f - 648 commits from branch
added 759 commits
-
da745068...097dcdad - 758 commits from branch
master
- c0a03397 - Merge branch 'master' into 416097-use-cost-factored-storage-size-on-frontend
-
da745068...097dcdad - 758 commits from branch
- Resolved by Vitaly Slobodin
@aalakkad I see this is assigned to me. Is this MR ready to be reviewed? Thanks.
removed review request for @vitallium
added 394 commits
-
c0a03397...05fe432c - 393 commits from branch
master
- 4be917f8 - Merge branch 'master' into 416097-use-cost-factored-storage-size-on-frontend
-
c0a03397...05fe432c - 393 commits from branch
requested review from @vitallium
- Resolved by Vitaly Slobodin
requested review from @jagood
removed review request for @vitallium
removed review request for @jagood
requested review from @vitallium
mentioned in commit 5bbafe9b
I wonder how I was able to merge my own MR even thought I'm not a maintainer
@vitallium is it because you (maintainer) approved it?
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-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label