Make duo pro trials only available for namespace on premium plan
What does this MR do and why?
Make duo pro trials only available for namespace on premium plan
- enable a coordinated and derisked rollout.
- guard all entry points and creation.
- see https://gitlab.com/gitlab-org/gitlab/-/issues/468774 for why
- guard the CTAs that direct to the duo pro routes and the duo pro routes and applying of trials.
DB analysis
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
in-app trial page | ultimate billing(before, after duo card will be premium only) | ultimate trial billing(after care will not exist) |
---|---|---|
note: the access denied page will be updated via #470064+
How to set up and validate locally
duo_enterprise_trials
disabled
Feature flag Ultimate group
- Setup GDK to simulate SaaS.
- Create new group.
- In rails console make it ultimate.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
- Visit
/-/trials/duo_pro/new?namespace_id=<new-group-id>
. Ensure reachable - Visit the group's billing page groups > billings. Ensure you can see the duo pro trial card.
Ultimate trial group
- Setup GDK to simulate SaaS.
- Create new group.
- In rails console make it ultimate trial.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate trial'))
- Visit
/-/trials/duo_pro/new?namespace_id=<new-group-id>
. Ensure reachable - Visit the group's billing page groups > billings. Ensure you can see the duo pro trial card.
duo_enterprise_trials
enabled
Feature flag - Enable the feature flag in the rails console with:
Feature.enable(:duo_enterprise_trials)
- Visit
/-/trials/duo_pro/new?namespace_id=<new-group-id>
. Ensure not reachable. - Visit the group's billing page groups > billings. Ensure you do not see the duo pro trial card.
- In the rails console make the (ultimate) group premium.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'premium'))
- Repeat verification steps. This time the items should be accessible.
- Repeat the verification steps only for the ultimate trial group.
Related to #468774
Edited by Doug Stull