Loading
Handle rate-limited GLQL requests in embedded views and panels
What does this MR do and why?
Makes GLQL embedded views and dashboard panels handle rate-limited requests.
- A 429 from
/api/glqlnow counts as rate limited inclassifyGlqlError. The existing 403 "Query temporarily blocked" lock, which pauses one query text after repeated timeouts, gets its own category,GLQL_ERROR_QUERY_PAUSED. - Embedded views show "Embedded view was rate limited. Try again later." for a 429, and "This embedded view timed out too often and is paused for up to 15 minutes. Add filters to narrow it, or try again later." for the lock, both with a Retry button. Before, a 429 showed the generic error, and the lock's 403 showed "You do not have permission to view this embedded view."
- Dashboard panels show "The query was rate limited. Try again later." for a 429, and "The query timed out too often and is paused for up to 15 minutes. Select a shorter date range, or try again later." for the lock, both with Try again. Before, a 429 was classified as generic, and the lock had no Try again.
- When
Retry-Afteris 10 seconds or less, both retry once automatically, and an embedded view shows a loading skeleton while it waits. A second automatic retry needs a successful load in between, so it can't loop. Dashboard panels that already show rows (a failed continuation page) don't auto-retry, because a retry would drop them. Dashboard panels get a fresh automatic retry when their query, scope or filters change. - The GLQL Apollo client must never set a
batchKey: a batched (multiplexed) body skips GLQL's rate limits. A spec pins it.
GitLab's rack-level rate limiter already answers 429 to some callers on this endpoint, and upcoming DB-time budgets answer 429 with Retry-After.
References
Screenshots or screen recordings
The error states were produced by stubbing fetch for /api/glql in the browser on GDK.
| State | Before | After |
|---|---|---|
| Embedded view, 429 | ![]() |
![]() |
| Embedded view, timeout lock (403) | ![]() |
![]() |
| Dashboard panel, 429 | ![]() |
![]() |
| Dashboard panel, timeout lock (403) | ![]() |
![]() |
With a short Retry-After, an embedded view shows a loading skeleton, then retries by itself:
| Waiting | After the retry |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Make
/api/glqlanswer 429, for example by setting a low GLQL DB-time limit and enabling enforcement once the budgets MR is merged, or by returning a 429 from a browser request override forPOST /api/glql. - Open an issue or wiki page with a GLQL embedded view. It shows the rate-limited alert with a Retry button.
- Open a GLQL dashboard. Its panels show "The query was rate limited. Try again later." with Try again.
- Answer with
Retry-After: 2. The view loads again after two seconds without user action.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Daniele Rossetti









