Skip to content

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

  1. Run CustomersDot (in case to yet merged - branch for https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/4154) and GitLab locally
  2. On your local GitLab instance enable a feature toggle
  3. Run rails c
  4. Run Feature.enable(:new_route_storage_purchase) to enable the feature flag for Storage flow
  5. Make sure that you have correct settings Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
  6. Create a new group on GitLab
  7. 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.

Edited by Diana Zubova

Merge request reports

Loading