Pass the correct container object for DORA metrics
What does this MR do and why?
This MR fixes the missing DORA metrics from the project-level VSA page.
Problem: we've recently removed the project-level CycleAnalytics::ProjectStage
model and replaced it with CycleAnalytics::Stage
. The model has a parent
method which always points to a namespace
record.
- Before the change:
stage.parent -> Project or Group
- After the change:
stage.parent -> Namespaces::ProjectNamespace or Group
The DORA service accepts Project
or a Group
as the container. When an instance of Namespaces::ProjectNamespace
was passed in, the service started to fail.
Why did it happen? We didn't have a test case covering the case for a Namespaces::ProjectNamespace
object. Also, the service was always stubbed out.
How to set up and validate locally
- Ensure that you have Ultimate license
- Go to Project > Analytics > Value Stream
- The DORA metrics tiles should show up (lead time for changes, change failure rate, etc.)
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 #384551 (closed)