Skip to content

Expose overview counts for projects

Adam Hegyi requested to merge 456891-expose-vsa-usage-overview-for-projects into master

What does this MR do and why?

This MR exposes the VSD overview counts node (valueStreamDashboardUsageOverview) for a project via GraphQL (we already have group-level metrics).

Not all metrics are available for a project, so a new enum was added: Types::Analytics::ValueStreamDashboard::ProjectMetricEnum

Apart from exposing the metrics, some backend services were updated to support querying project namespaces.

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.

How to verify

  1. Ensure that you're on ultimate.
  2. Seed VSD data: FILTER=vsd_overview_counts bundle exec rake db:seed_fu
  3. Find a project
  4. Invoke the GraphQL query
query test {
  project(fullPath: "gitlab-org/gitlab-shell") {
    id
    valueStreamDashboardUsageOverview(
      identifier: MERGE_REQUESTS
      timeframe: {start: "2024-01-01", end: "2024-07-02"}
    ) {
      count
      recordedAt
    }
  }
}

Related to #456891 (closed)

Edited by Adam Hegyi

Merge request reports