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 value orbit_promo: 10 with 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 the AddOn enum, and a spec asserts this.
  • GitlabSubscriptions::AddOnPurchase: new scope for_orbit_promo, shaped like for_flex_offline and for_secrets_manager.
  • Factory traits :orbit_promo for 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" = 10

References

Screenshots or screen recordings

N/A (backend changes only)

How to set up and validate locally

In a Rails console:

  1. Run GitlabSubscriptions::AddOn.find_or_create_by_name('orbit_promo'). It creates the record.
  2. Run GitlabSubscriptions::AddOn.duo_add_ons and GitlabSubscriptions::AddOn.seat_assignable_duo_add_ons. Neither includes orbit_promo.
  3. Run GitlabSubscriptions::AddOnPurchase.for_orbit_promo.to_sql. It shows subscription_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.

🤖 Generated with Claude Code

Edited by Qingyu Zhao

Merge request reports

Loading
Loading