Restrict Cycle Analytics date range (for performance)
Cycle Analytics supports start and end date URL parameters when querying data for a specific stage.
Example:
created_after=2019-01-01&created_before=2019-05-01
In some cases, especially on GitLab.com, a large date range might produce long response times or even SQL statement timeouts. To prevent these issues (or at least reduce the likelihood), the backend should limit the date range (example: max 90 days -> Application Limits ).
Implementing validation rule for the date range is quite simple on the backend side, however this needs to be clearly visible on the frontend. Ideas:
- Restrict the date picker components to only allow selecting a valid range.
- Backend returns a validation error message when the date range is too big, FE shows the error to the user.
Also considered a LIMIT clause, but that is ineffective in reducing these query times.
Edited by Brandon Labuschagne