[VSA] Display MRs instead of CI Builds for Test and Staging stages
Background
In group-level VSA, the default test
and staging
stages are unique because they display CI Build records, whereas other stages show either Issue or MR records. I'm fairly sure displaying CI Build records is no longer correct (legacy).
Problems to solve
-
Performance. In group-level VSA, the default
test
andstaging
stages are timing out when listing the CI Build records. (Previously, it was hard to notice due to a frontend bug: #334487 (closed).) This is probably because thetest
andstaging
queries join on theci_builds
table and show build records on the UI. This makes the database scan way too many rows, which leads to statement timeout. - Confusing UI. A single MR will produce multiple CI Build records if there are multiple jobs in the pipeline (causing excessive granularity in the UI) or the pipeline is run more than once (causing duplication in the UI).
Proposal
To improve the UI, show MR records (instead of CI Build records) for the test
and staging
stages. To improve the performance, eliminate the JOIN ON ci_builds
because it will no longer be necessary.
Notes:
- No change needed for the summary calculations (like median). The pipeline times are not used for those calculations. We use the data we have in the
merge_request_metrics
table:latest_build_started_at
,latest_build_finished_at
andfirst_deployed_to_production_at
columns. - Removing the joins would also help the ongoing CI sharding effort.
Example of CI Builds
Edited by Dan Jensen