Loading
Stop the Orbit Overview waiting on groups that never index
What does this MR do and why?
This MR stops the Orbit Overview from waiting forever for a group that never starts to index.
Terms
- Indexing phase: the status Orbit reports for a group. Examples are
NOT_STARTED,SYNCING, andREADY. - Start timeout: the first 3 days after an owner turns on Orbit for a group (
INDEXING_START_TIMEOUT_MS). The indexer usually starts in seconds. A group that has not started after 3 days is stuck.
The problem
- The Overview asks each group for its indexing phase.
- If one group is
NOT_STARTEDorSYNCING, the page shows "Indexing in progress". It hides the counts and polls every 20 seconds. - On GitLab.com, a group turned on in April has 0 projects and is still
NOT_STARTED. The indexer never started a run for it. - The page stays in the loading state for every user who has that group, and it does not stop.
The fix
- The dashboard query now asks for
orbit.enabledAt. isIndexingcountsNOT_STARTEDas indexing only inside the start timeout.SYNCINGstill counts at all times.isIndexingQueueduses the sameenabledAtcheck with its own 10-minute window.
Follow-ups, not in this MR
- The Group status tab, the Admin area, and group settings still poll a
NOT_STARTEDgroup with no end. - The Orbit server must report a stuck group as stuck. See the knowledge-graph MR below.
References
- Related to gitlab-org/orbit/knowledge-graph#1370
- Follow-up to !260936 (merged)
- Likely server-side cause: the ClickHouse enabled-groups table was recreated in !232941 (merged), so the April row never reached the indexer. Similar to gitlab-org/orbit/knowledge-graph#1134 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
| "Indexing 1 of 27 groups" and the overlay stay on the page. | Counts load. The overlay and the alert go away. |
How to set up and validate locally
-
Turn on Orbit for a group.
-
Make the indexing status for that group return
NOT_STARTED, withenabledAtmore than 3 days ago. -
Open
/dashboard/orbit/overview. -
Make sure the counts show and the "Indexing" alert does not show.
-
Run the specs:
yarn jest ee/spec/frontend/orbit/utils/orbit_group_state_spec.js ee/spec/frontend/orbit/dashboard
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.