Skip to content

Add subscription group creation endpoints

Josianne Hyson requested to merge jh/subscription_groups_controller into master

What does this MR do and why?

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/468097+

Add subscription group creation endpoints new and create.

We need to be able to create a group in the GitLab purchase flow, before the customer is sent to CustomersDot for the purchase. Add two new actions to the Subscriptions::GroupsController to facilitate the creation of a new group for subscription purchase.

This will be followed up by https://gitlab.com/gitlab-org/gitlab/-/issues/460774+ which adds the frontend component.

Currently, this is behind a disabled feature flag.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots

Scenario FF disabled FF enabled
Navigate to new CleanShot_2024-06-20_at_19.07.01_2x CleanShot_2024-06-25_at_12.33.10_2x
Missing plan_id CleanShot_2024-06-20_at_19.07.17_2x CleanShot_2024-06-20_at_19.05.3CleanShot_2024-06-25_at_12.32.03_2x4_2x
Signed out CleanShot_2024-06-20_at_19.07.41_2x CleanShot_2024-06-20_at_19.06.10_2x

How to set up and validate locally

Start CustomersDot and the GDK.

  1. GitLab: enable the migrate_purchase_flows_for_existing_customers feature flag
  2. GitLab: navigate to http://localhost:3000/-/subscriptions/groups/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff
    • a blank page should be rendered
  3. GitLab: navigate to http://localhost:3000/-/subscriptions/groups/new
    • a 404 should be rendered
  4. GitLab: sign out and navigate to http://localhost:3000/-/subscriptions/groups/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff
    • you should be redirected to sign in
Edited by Josianne Hyson

Merge request reports