Register GitLab Flex Offline Add-on

What does this MR do and why?

Summary

This change adds support for the flex_offline add-on for GitLab's self-managed licensing system.

Specifically, it:

  • Registers flex_offline as a recognized add-on type
  • Adds the logic needed to provision (create, update, or skip) a flex_offline add-on purchase based on what's included in a customer's license
  • Includes tests to verify the new add-on behaves correctly in various scenarios

GitlabSubscriptions::AddOnPurchase.for_flex_offline Scope Query

The for_flex_offline scope follows the same identical pattern as existing for_* add-on scopes (e.g., for_gitlab_credits). No flex_offline AddOnPurchase records exist in production yet, so a query plan would not provide meaningful data. The raw SQL is provided here for reference per the database review guidelines

SELECT "subscription_add_on_purchases".* FROM "subscription_add_on_purchases" WHERE "subscription_add_on_purchases"."subscription_add_on_uid" = 9 /* loading for pp */ LIMIT 11 

References

Screenshots or screen recordings

N/A (backend changes only)

How to set up and validate locally

Please see this internal note for testing instructions

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 #614031

Edited by Valerie Burton

Merge request reports

Loading
Loading