Implement VSD GraphQL query
What does this MR do and why?
This MR implements the value stream dashboard overview count aggregation query and exposes the data via GraphQL.
GraphQL query:
{
group(fullPath: "gitlab-org") {
valueStreamDashboardUsageOverview(identifier: PROJECTS, timeframe: { start: "2021-01-01", end: "2023-08-31" }) {
identifier
count
recordedAt
}
}
}
Database
Query with data (produced by invoking Analytics::ValueStreamDashboard::CountWorker
with PG.ai):
- Cached: https://explain.depesz.com/s/RsH8
- Uncached (no aggregations data on PRD yet, the query mostly reads the group hierarchy): https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/21536/commands/70081
How to verify
- Ensure that you're on ultimate.
- Find the
gitlab-org
group and create some test counts.
group = Group.find_by_path("gitlab-org")
FactoryBot.create(:value_stream_dashboard_count, namespace: group, count: 500, recorded_at: "2023-08-20")
- Invoke the graphql query mentioned above
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #402997 (closed)
Edited by Adam Hegyi