Skip to content

Add bring-your-own-cluster onboarding flow to Product Analytics setup

Elwyn Benson requested to merge 442123-byoc-onboarding into master

What does this MR do and why?

Updates the product analytics onboarding state to make bring-your-own-cluster (BYOC) setup path more clear.

This change only applies when running on .com, due to current limitations in using a GitLab-managed cluster with self-managed GitLab. This change is also hidden behind an existing feature flag, product_analytics_billing.

The onboarding page now checks which project-level settings are currently set for product analytics:

  • When selecting self-managed provider, it will prompt and redirect to the settings page if the project does not have all required settings.
  • When selecting GitLab-managed provider, it will prompt and redirect to settings page if the project has any project-level settings. These must be removed in order to connect to the instance-level cluster.

A future iteration will aim to remove these manual redirects and make this flow smoother for customers. See discussion for details.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After Notes
image image (no difference) If product_analytics_byoc is not enabled, or if running in any environment which is not .com
image product_analytics_byoc enabled, running on .com. Project does not have settings for a provider (or is missing some setting value)
image Clicked Connect your own provider, about to redirect to settings
image After returning from project settings, with config saved
image Clicking Use GitLab-managed provider without confirming region
image Clicking Use GitLab-managed provider but the project has one or more settings already pointing at custom provider
image Same loading state for BYOC or GitLab-managed
image Small size, stacked layout

Screen recording:

byoc-flow-2

How to set up and validate locally

  1. Follow these instructions to setup Product Analytics in GDK.
  2. View the onboarding page for a new project at Project > Analytics > Analytics dashboards > Set Up [product analytics].
  3. Verify the existing onboarding page is shown when the FF is disabled and when not running as .com
  4. echo "Feature.enable(:product_analytics_byoc)" | gdk rails c and run as .com
  5. Verify new onboarding page displays as expected
  6. Verify prompts + redirects work as expected as per MR description
  7. Verify you reach instrumentation instructions when continuing through flow

Related to #442123 (closed)

Edited by Jiaan Louw

Merge request reports