Add product_analytics_enabled application setting
What does this MR do and why?
- Adds an application setting to enable or disable the new product analytics stack currently in development.
- The frontend work will be completed in #375577 (closed).
How to set up and validate locally
- Make sure the migration in this MR has been executed.
- Enable the feature flag (we're not testing that here):
Feature.enable(:cube_api_proxy)
- Attempt to initialize the analytics stack for a project:
ProductAnalytics::InitializeStackService.new(container: Project.first, current_user: User.first).execute
- Validate that an instance of
ProductAnalytics::InitializeAnalyticsWorker
was not enqueued in sidekiq. - Enable the newly created application setting:
Gitlab::CurrentSettings.update!(product_analytics_enabled: true)
- Attempt to initialize the analytics stack for a project:
ProductAnalytics::InitializeStackService.new(container: Project.first, current_user: User.first).execute
- Validate that an instance of
ProductAnalytics::InitializeAnalyticsWorker
was enqueued in sidekiq.✅
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #376678 (closed)
Edited by Dennis Tang