Add feature flag for new Ultimate trial CustomersDot endpoint

Summary

CustomersDot is introducing a dedicated trials/gitlab_com/ultimates endpoint to replace the legacy trials endpoint used for Ultimate trial signups. This MR adds a default-off, per-user new_ultimate_trial_endpoint feature flag and routes Gitlab::SubscriptionPortal::Client#generate_trial to the new endpoint when the flag is enabled for the requesting user, falling back to the legacy endpoint otherwise.

generate_trial has a single caller in the codebase (GitlabSubscriptions::Trials::ApplyTrialService), which is used exclusively by the Ultimate trial flow, so gating this method does not affect Duo Pro/Enterprise trial flows.

This is purely wiring — no behavior changes for any user until the flag is enabled for their account, since the check is per-actor (percentage of users rollout) and default off.

References

Testing

  • bundle exec rspec ee/spec/lib/gitlab/subscription_portal/clients/rest_spec.rb — 235 examples, 0 failures
  • bundle exec rubocop on changed files — no offenses
Edited by Serhii Yarynovskyi

Merge request reports

Loading