Fix intermittent CI/CD analytics request error for 180 day windows
What does this MR do and why?
We were seeing occasional errors on the CI/CD analytics page when using the Last 180 days
time period.
This was happening because the REST API was using the time period start_date.at_beginning_of_day -> Time.current.at_end_of_day
, as opposed to the GraphQL API which was using start_date.at_beginning_of_day -> Time.current.at_beginning_of_day
. That small difference was enough to increase the time window to be slightly larger than what is allowed, causing the request to fail.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Visit CI/CD analytics page for any group (ex. http://gdk.test/groups/flightjs/-/analytics/ci_cd?tab=deployment-frequency)
- Click the
Last 180 days
tab - Check for a page alert indicating the error
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 #412356 (closed)