Resolve "Add feature flag and routing for new addon trial endpoint"
What does this MR do and why?
This MR adds routing logic to switch between the legacy (trials/create_addon) and new (trials/gitlab_com/addons) CustomersDot endpoints for addon trial requests, controlled by the new_addon_trial_endpoint feature flag.
References
How to set up and validate locally
-
Verify feature flag behavior in Rails console:
# With flag disabled (default) Feature.disable(:new_addon_trial_endpoint) Gitlab::SubscriptionPortal::Client.send(:addon_trial_endpoint) # => "trials/create_addon" # With flag enabled Feature.enable(:new_addon_trial_endpoint) Gitlab::SubscriptionPortal::Client.send(:addon_trial_endpoint) # => "trials/gitlab_com/addons" -
If you have CDot running locally, you can also test whether it calls the correct endpoint
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #582588
Edited by Konstantin Greif