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_billing and product_analytics_billing_override feature flags
    • Billing methods in ProductAnalyticsHelpers
    • GraphQL field productAnalyticsStoredEventsLimit (experiment status, so no deprecation cycle is needed)
    • AddOnPurchase.for_product_analytics scope
    • The product_analytics add-on enum entry and the check_add_on_availability! guard
    • The product_analytics param on the internal add-on purchases API
    • The orphaned update_product_analytics_settings permission
    • 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 containing product_analytics is silently ignored (2xx response, no purchase created).
  • Enum value 2 is tombstoned with a comment. No data migration is included because the feature was never released to customers.

References

How to set up and validate locally

  1. Check out the branch in GDK.

  2. 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
  3. In GraphiQL (http://gdk.test:3000/-/graphql-explorer) run:

    query { namespace(fullPath: "gitlab-org") { productAnalyticsStoredEventsLimit } }

    Confirm it returns a Field 'productAnalyticsStoredEventsLimit' doesn't exist error.

  4. In a Rails console, confirm GitlabSubscriptions::AddOn.names has no product_analytics key and Feature::Definition.get(:product_analytics_billing) is nil.

  5. Visit a group's Settings > Usage quotas page and confirm it loads normally.

  6. 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

Merge request reports

Loading
Loading