Skip to content

Update individual dashboards to retrieve dashboards from backend

Robert Hunt requested to merge 382551-fetch-individual-dashboard into master

What does this MR do and why?

This MR updates the individual dashboards to retrieve the dashboard from the GraphQL endpoint. The GraphQL endpoint uses Snowplow rather than Jitsu, so we also have to make sure Snowplow is enabled using the product_analytics_snowplow_support feature flag.

Specifically the changes made are:

  • Updates individual dashboards to retrieve from GraphQL when Snowplow is enabled
  • Updated specs to test with and without Snowplow enabled

This MR is part 2/2. The first MR Update dashboards listing to retrieve dashboard... (!121127 - merged) updates the listing to use the GraphQL endpoint.

Known issues

Screenshots or screen recordings

Viewing dashboard with Jitsu

Screen_Recording_2023-05-18_at_15.53.36

Viewing dashboard with Snowplow

Screen_Recording_2023-05-18_at_16.45.50

How to set up and validate locally

Note: When setting up custom dashboards, the Jitsu implementation expects them to be located at .gitlab/dashboards/{dashboard}.yml whilst the Snowplow implementation has changed the location to be .gitlab/analytics/dashboards/{dashboard}/{dashboard}.yaml. When testing the custom dashboards, make sure to have dashboards set up for both locations.

  1. Follow these instructions to set up Product Analytics in your GDK.
  2. Set up three projects within the same group:
    • One is for Jitsu set up
    • One is for Snowplow set up
    • One is to act as a custom dashboards project like in !112481 (merged)
      • This requires this project to have a main branch and have that set to be the default branch for the project.
  3. Go through the set-up process described in the instructions for your Jitsu project.
  4. View the dashboard list at Project → Analytics → Dashboards.
  5. Select a By GitLab dashboard.
  6. Verify the dashboard is shown correctly.
  7. Select a custom dashboard.
  8. Verify the dashboard is shown correctly.
  9. Enable the Snowplow flag by running the command: echo "Feature.enable(:product_analytics_snowplow_support)" | rails c.
  10. Change to your Snowplow project and go through the set-up process again for Snowplow.
  11. Select a By GitLab dashboard.
  12. Verify the dashboard is shown correctly.
  13. Select a custom dashboard.
  14. Verify the dashboard is shown correctly.

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 #382551 (closed)

Edited by Robert Hunt

Merge request reports