Redirect purchase link to new group flow when applicable
What does this MR do and why?
This MR builds upon the changes from !157042 (merged) & !156854 (merged).
Whenever we navigate to the premium/ultimate purchase flow without passing in a namespace_id, this MR ensures the newly created subscription based group creation/selection navigation kicks in.
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 or screen recordings
How to set up and validate locally
- Since we will depend on interaction between CustomersDot and GitLab, we would need the following requisites enabled:
- Ensure GDK and CustomersDot are both running on your system.
- Ensure the GitLab GraphQL proxy setup is completed for communication between the two.
- Purchase any new subscription and ensure it is activated on a GitLab group.
- Now we can test out the flow by:
- Enable the
migrate_purchase_flows_for_existing_customers
feature flag. - Navigate to the purchase flow URL for a premium or ultimate subscription without passing in the namespace ID.
- Premium purchase URL: http://localhost:3000/-/subscriptions/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff
- Ultimate purchase URL: http://localhost:3000/-/subscriptions/new?plan_id=2c92a0ff76f0d5250176f2f8c86f305a
- The new group navigation should kick in.
- When the FF is switched off or if there have never been any existing purchases for the user, the existing 404 page should kick in.
Edited by Aman Luthra