Add a param to indicate the purchase request is from GitLab.com
What does this MR do and why?
Sends a new param in the new subscription purchase request to Customers Portal to indicate that the purchase originated from GitLab.com.
MR that consumes this new param in Customers Portal: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10155/diffs
Related to https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9697
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
log/development_json.log
content:
{
"method": "POST",
"path": "/subscriptions",
"format": "json",
"controller": "SubscriptionsController",
"action": "create",
"status": 201,
...
"unpermitted_params": [
"purchase_flow",
...
],
"params": [
{
"key": "purchase_flow",
"value": "gitlab"
},
...
],
...
}
How to set up and validate locally
Application setup
- Customers Dot needs to be setup in order to view the billing page for a group
- Start GDK in SaaS mode
GITLAB_SIMULATE_SAAS=1 gdk start
Group setup
- Create a Group
- [SaaS subscription]: Go to [Group] > Settings > Billing > Click on
Upgrade to Premium
/Upgrade to Ultimate
- [Add-on]: Got to [Group] > Settings > Usage Quotas > Pipelines / Storage > Click on
Buy additional compute minutes
/Buy storage
New param verification
- Open
log/development_json.log
in Customers Portal repo - Look for subscription creation request with the new param
is_purchase_from_gitlab_com
set to true for requests from GitLab.com
Edited by Vamsi Vempati