Add orbit_promo subscription add-on
What does this MR do and why?
For issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/632846+
Orbit is sold during a promo period as an "Orbit Promotional ELA" add-on, and Orbit access must be driven by an add-on instead of the plan tier. This MR adds the orbit_promo subscription add-on so GitLab can recognize it.
GitlabSubscriptions::AddOn: new enum valueorbit_promo: 10with the description 'Add-on for GitLab Orbit Promotional ELA.'GitlabSubscriptions::SystemDefined::AddOn: new fixed item with id 10 and name 'orbit_promo'. The ids must match theAddOnenum, and a spec asserts this.GitlabSubscriptions::AddOnPurchase: new scopefor_orbit_promo, shaped likefor_flex_offlineandfor_secrets_manager.- Factory traits
:orbit_promofor add-ons and add-on purchases, plus specs.
orbit_promo is not a Duo add-on and is not seat-assignable. Provisioning from the license comes in a follow-up MR that is stacked on this one.
for_orbit_promo scope query
No orbit_promo purchases exist in production yet, so a query plan is not meaningful. The scope resolves the uid in Ruby, so the SQL is:
SELECT "subscription_add_on_purchases".* FROM "subscription_add_on_purchases" WHERE "subscription_add_on_purchases"."subscription_add_on_uid" = 10References
- Epic: https://gitlab.com/groups/gitlab-org/-/work_items/23874+
- Prior art for the
secrets_manageradd-on:- Add-on and scope: !236639 (merged)
- Self-managed provisioning: !237722 (merged)
Screenshots or screen recordings
N/A (backend changes only)
How to set up and validate locally
In a Rails console:
- Run
GitlabSubscriptions::AddOn.find_or_create_by_name('orbit_promo'). It creates the record. - Run
GitlabSubscriptions::AddOn.duo_add_onsandGitlabSubscriptions::AddOn.seat_assignable_duo_add_ons. Neither includesorbit_promo. - Run
GitlabSubscriptions::AddOnPurchase.for_orbit_promo.to_sql. It showssubscription_add_on_uid= 10.
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.