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, and READY.
  • 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

  1. The Overview asks each group for its indexing phase.
  2. If one group is NOT_STARTED or SYNCING, the page shows "Indexing in progress". It hides the counts and polls every 20 seconds.
  3. 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.
  4. The page stays in the loading state for every user who has that group, and it does not stop.

The fix

  1. The dashboard query now asks for orbit.enabledAt.
  2. isIndexing counts NOT_STARTED as indexing only inside the start timeout. SYNCING still counts at all times.
  3. isIndexingQueued uses the same enabledAt check 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_STARTED group with no end.
  • The Orbit server must report a stuck group as stuck. See the knowledge-graph MR below.

References

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

  1. Turn on Orbit for a group.

  2. Make the indexing status for that group return NOT_STARTED, with enabledAt more than 3 days ago.

  3. Open /dashboard/orbit/overview.

  4. Make sure the counts show and the "Indexing" alert does not show.

  5. 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.

Merge request reports

Loading
Loading