VSD [BE] - "Projects by DORA table" - improve the accuracy of the projects representation
Problem
Subgroup projects with DORA metrics are not included in the "Projects by DORA table".
We are unable to fetch all DORA metrics for a Group's nested projects in a timely manner. When trying to implement the following change to the GraphQL query, load times spiked significantly due to the ~5000 subgroup projects with the gitlab-org group.
{
group(fullPath: "gitlab-org") {
id
- projects {
+ projects(includeSubgroups: true) {
pageInfo {
endCursor
hasNextPage
}
nodes {
id
dora {
metrics {
changeFailureRate
deploymentFrequency
leadTimeForChanges
timeToRestoreService
}
}
}
}
}
}
Since we are paginating the data to completion before rendering the table, this requires ~50 subsequent requests to load all of the table data.
Of the ~5000 projects within the gitlab-org group, less than 100 of them have DORA metric data. Ideally we should be able to fetch this data in a single request by filtering out projects with no DORA metric data on the backend.
Proposed solution
Introduce new field projects for group level DoraType which should return only list of projects with at least 1 DORA metric record in given timeframe. Example:
{
group(full_path: "gitlab-org") {
dora {
projects(from: "2025-01-01", to: "2025-02-02", includeSubgroups: true) {
pageInfo {
endCursor
hasNextPage
}
nodes {
id
dora {
metrics(from: "2025-01-01", to: "2025-02-02") {
changeFailureRate
deploymentFrequency
leadTimeForChanges
timeToRestoreService
}
}
}
}
}
}
}
-
projectsfield should use new DoraProjectsFinder which inherits from default one. -
DoraProjectsFinderneeds to support everything genericProjectsFindersupports and add special filter for DORA presence. -
projectsfield should acceptfrom, topair which will define the timeframe to be used while checking DORA records existence. -
projectsfield makes sense for group level only.
Spec
- The table should include all projects within the selected group and its sub-groups.
- The table should include all child projects from sub-groups within the group hierarchy.
- The table should filter out projects with no DORA data.
- The number of projects displayed in the table must match the count of projects contributing to the DORA Performers score bar chart.