Expose cycle analytics summary separately
What does this MR do?
- Adds a new controller with one action to expose the summary (as json)
- Uses
Gitlab::Analytics::CycleAnalytics::RequestParams
to validate the date input parameters - Updates
Gitlab::CycleAnalytics::GroupStageSummary
to support querying for a date range (from
-to
)
More Context
The current cycle analytics implementation returns counts, medians in one response. In some cases this might take long time and could cause timeouts. Within #12196 (closed) we're rebuilding the cycle analytics feature to support customization and better performance.
This change provides the counts (see screenshot) as a separate endpoint for the new implementation. The new endpoint expects two URL parameters created_after
and created_before
. This was implemented earlier in CA, however I noticed that it was not working properly (created_before
, internally: to
parameter was not passed, fixed).
Endpoint: -/analytics/cycle_analytics/summary?group_id=countgroup
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
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
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