Skip to content

Remove manual redirects to settings page when clearing self-managed provider settings during product analytics onboarding

What does this MR do and why?

When onboarding product analytics, and a project has existing project-level provider settings configured, if a user selects the "use instance-level settings" checkbox, we need to clear out the existing project-level settings so that when the onboard step runs it uses the settings.

We now reuse the existing component to do this nicely behind the scenes, removing the clunky redirect to the settings page, so the user no longer needs to do this manually.

Some UI copy was also updated here to remove the -level language which is now discouraged.

Editing settings work stream:

  • Fetch project-level provider settings via GraphQL !160657 (merged)
  • Extract clear settings modal to standalone component !160659 (merged)
  • Remove redirect when clearing self-managed project-level provider settings <-- you are here
  • Allow configuring project-level provider settings within onboarding flow !160669 (merged)

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
image image (this is the same modal already used in the GitLab-managed provider flow)

How to set up and validate locally

  1. Follow these instructions to setup Product Analytics in GDK.
  2. Create a new project / visit a not-onboarded project.
  3. Ensure you are signed in as a maintainer or higher role.
  4. Manually configure some project-level provider settings at Project > Settings > Analytics > Data Sources > Product Analytics (any dummy values can be used, e.g. https://example.com)
  5. Visit Project > Analytics > Analytics dashboards.
  6. Click "Set up"
  7. On the self-managed provider card, check Use instance-level settings, and then click Use self-managed provider
  8. Verify the new modal prompts you to clear existing settings, after which the onboarding flow continues seamlessly as expected
Edited by Elwyn Benson

Merge request reports

Loading