Add merge request analytics system dashboard behind a flag

What does this MR do and why?

Adds a Merge request analytics system dashboard to Explore > Analytics dashboards, behind the new gi_migration_merge_request_analytics wip feature flag. This is the first step in moving the legacy project dashboard into the new space.

  • Mean time to merge and Throughput are GLQL panels (type = MergeRequest analytics: timeToMergeMean, and throughputCount by merged(%{dynamicGranularity}), so the buckets follow the selected date range). This also covers the GLQL conversion of these two panels.
  • Merge requests keeps the legacy merge_requests data source and columns. GLQL can't produce this table yet.
  • The flag checks the user as actor, so it can be enabled per user or by percentage of actors.
  • The dashboard declares data: [clickhouse], because the GLQL merge request engine reads ClickHouse.
Why the flag uses a user actor only

It matches the sibling DORA flag (!262584 (merged)), which also uses a user actor. An organization actor would be all-or-nothing on GitLab.com, where almost every user is in the default organization. A user actor allows --user and percentage-of-actors rollouts. Enabling the flag for a group has no effect.

Known gaps, tracked separately:

References

Screenshots or screen recordings

How to set up and validate locally

ClickHouse and Siphon need to be running in GDK for the GLQL panels.

  1. In the Rails console, enable the flag:

    Feature.enable(:gi_migration_merge_request_analytics)
  2. Visit /explore/analytics_dashboards and open Merge request analytics.

  3. Select a project with merged merge requests, such as gitlab-org/gitlab-test.

  4. Compare the values with the legacy dashboard at /<project>/-/analytics/merge_request_analytics for the same date range.

  5. Disable the flag and check the dashboard is no longer listed, and its URL no longer loads.

MR acceptance checklist

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

Edited by Rudy Crespo

Merge request reports

Loading
Loading