Expose average durations for the VSA chart
What does this MR do?
This MR exposes average durations aggregated daily within the Group level VSA feature. The new endpoint would replace the chart at https://docs.gitlab.com/ee/user/group/value_stream_analytics/index.html#days-to-completion-chart
How to test it:
- Make sure you're on ultimate
- Seed a new group:
SEED_VSA=true FILTER=cycle_analytics rake db:seed_fu
- Visit the group page
- Go to Analytics -> Value stream
- Open the web inspector for looking up the API calls
- Select a stage in the top bar
- Look for the duration_chart endpoint
- Copy the URL and replace
duration_chart
toaverage_duration_chart
- Data should show up
Note: The old endpoint (duration_chart
) will stay in the codebase to ensure the app is working when zero downtime deployment is used. It will be removed in the next milestone.
Database
Plan: https://explain.depesz.com/s/Enk
The uncached plan is around 1s on PRD, it's much worse on PG.ai
VSA supports different kinds of end event definitions, so we can have have quite a few combinations. Generally the query loads all issues or MRs (group level) for a given time range (1 month) and aggregates the result.
Note: the existing endpoint has similar performance characteristics.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because, not user facing, FE change is not done yet.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #326052 (closed)