Skip to content

Onboarding - add new stack creation

What does this MR do and why?

This MR adds the ability to trigger the creation of a new product analytics stack for a project that doesn't currently have one associated.

In the event that a project has a stack, an error will be shown. The next step to this is to add the tracking codes view in Onboarding - tracking codes view (#381320 - closed). There will be a follow-up MR to integrate the changes from #381320 (closed) and redirect to the tracking codes view once Onboarding - move states inside the onboarding app (!107665 - merged) is complete.

Also note that the state management in the frontend is temporary, improvements will be made in Onboarding - API to retrieve the state of a pro... (#382859 - closed).

Screenshots or screen recordings

Empty Loading
image image

Creating a new stack and then trying to create another on the same project

Kapture_2022-12-23_at_13.20.08

How to set up and validate locally

Make sure you are on at least GitLab Premium.

  1. Enable the feature flag's: echo "Feature.enable(:product_analytics_admin_settings) && Feature.enable(:cube_api_proxy) && Feature.enable(:product_analytics_internal_preview)" | rails c.
  2. Set up the devkit and start it running using docker-compose up.
  3. Visit admin settings and make sure that the settings have been set: /admin/application_settings/general#js-product-analytics-settings.
  4. Visit a dashboard on a project that hasn't been set up yet: /[GROUP]/[PROJECT]/-/product_analytics/dashboards/.
  5. Click the "Set up product analytics..." button and confirm no errors are shown.
  6. Make a GraphQL API call using /-/graphql-explorer or another client and confirm a jitsuKey is set:
query {
  project(fullPath: 'PATH_TO_PROJECT') {
    jitsuKey
  }
}
  1. Click the "Set up product analytics..." button and confirm the error for it already being set up is shown.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #381319 (closed)

Edited by Jiaan Louw

Merge request reports