Add request to orderPreview for storage purchase
What does this MR do and why?
Currently we don't show any proration information for storage purchase, this MR adds a new query and make a request to orderPreview
CustomersDot GraphQL to fetch this data. We need to fetch it initially and every time the purchase quantity changes.
Related to #347393
Screenshots or screen recordings
Storage | CI Minutes (no extra call!) |
---|---|
Screen_Recording_2021-12-21_at_10.33.35 | Screen_Recording_2021-12-21_at_10.34.12 |
How to set up and validate locally
Storage flow
- Run CustomersDot (in case to yet merged - branch for https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/4154) and GitLab locally
- On your local GitLab instance enable a feature toggle
- Run rails c
- Run
Feature.enable(:new_route_storage_purchase)
to enable the feature flag for Storage flow - Make sure that you have correct settings
Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
- Create a new group on GitLab
- Open this group and navigate to Settings -> Usage Quotas -> Storage click “Purchase more storage” OR use a fast forward link http://localhost:3000/-/subscriptions/buy_storage?selected_group=<id_of_an_existing_group>
CI Minutes flow
Should stay as it is, no extra request is made. To check it access http://localhost:3000/-/subscriptions/buy_minutes?selected_group=<id_of_an_existing_group>
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.
Edited by Diana Zubova