Loading
Remove product analytics usage billing
What does this MR do and why?
- Removes the product analytics usage billing MVC (&11387 (closed)). The feature was never enabled in production; both feature flags were off for everyone.
- Part of the Remove Product Analytics Category initiative. The frontend usage quotas tab was already removed in !200079 (merged) and the CustomersDot SKU in customers-gitlab-com!14973.
- What is removed:
product_analytics_billingandproduct_analytics_billing_overridefeature flags- Billing methods in
ProductAnalyticsHelpers - GraphQL field
productAnalyticsStoredEventsLimit(experiment status, so no deprecation cycle is needed) AddOnPurchase.for_product_analyticsscope- The
product_analyticsadd-on enum entry and thecheck_add_on_availability!guard - The
product_analyticsparam on the internal add-on purchases API - The orphaned
update_product_analytics_settingspermission - Factory traits and docs mentions
- GraphQL reference docs and introspection schema regenerated
- Specs that used the product analytics add-on as a stand-in for "a non-Duo add-on" or "a second add-on" now use
secrets_manager, keeping their original coverage. A new spec proves a CustomersDot payload containingproduct_analyticsis silently ignored (2xx response, no purchase created). - Enum value
2is tombstoned with a comment. No data migration is included because the feature was never released to customers.
References
- Related to #555924 (confidential)
- https://gitlab.com/groups/gitlab-org/-/work_items/17677
- Follows !250455 (merged) (merged)
How to set up and validate locally
-
Check out the branch in GDK.
-
Run the key specs:
bin/rspec ee/spec/models/gitlab_subscriptions/add_on_spec.rb ee/spec/models/gitlab_subscriptions/add_on_purchase_spec.rb ee/spec/models/concerns/product_analytics/product_analytics_helpers_spec.rb ee/spec/requests/gitlab_subscriptions/api/internal/add_on_purchases_spec.rb ee/spec/graphql/ee/types/namespace_type_spec.rb -
In GraphiQL (http://gdk.test:3000/-/graphql-explorer) run:
query { namespace(fullPath: "gitlab-org") { productAnalyticsStoredEventsLimit } }Confirm it returns a
Field 'productAnalyticsStoredEventsLimit' doesn't existerror. -
In a Rails console, confirm
GitlabSubscriptions::AddOn.nameshas noproduct_analyticskey andFeature::Definition.get(:product_analytics_billing)isnil. -
Visit a group's Settings > Usage quotas page and confirm it loads normally.
-
Greps proving removal is complete:
git grep -E "product_analytics_billing|for_product_analytics|product_analytics_stored_events_limit|EVENTS_PER_ADD_ON_PURCHASE|check_add_on_availability|update_product_analytics_settings"Returns nothing outside locale files, changelog archives, and doc-locale.
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.
Edited by Robert Hunt