Skip to content

Expose cycle analytics summary separately

Adam Hegyi requested to merge cycle-analytics-summary-endpoint into master

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

ca-custom-stages__add

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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
Edited by Adam Hegyi

Merge request reports