fix(orbit): handle new nested status response shape

What

Update glab orbit remote status to handle both the new nested response shape ({user, system}, GitLab 19.1+ after !241580) and the old flat shape (pre-19.1 instances).

Backward-compatible behavior

Response shape Condition Command behavior
New nested user.available == true, system present Print status.System as pretty JSON (same UX as before)
New nested user.available == false, system null Return actionable error with ExitOrbitUnavailable (exit code 2)
Old flat No user/system fields Print the full status as JSON (unchanged behavior)
HTTP 404 Feature flag off Existing orbiterr.Translate error (exit code 2)

Dependency: client-go struct fix

This MR depends on gitlab-org/api/client-go!2923 (merged) — the client-go OrbitStatus struct must be extended with User/System fields and a custom UnmarshalJSON.

Status: The client-go fix has been merged and released as v2.40.1. The replace directive has been removed and the dependency bumped to v2.40.1.

Cause

  • GitLab MR !241580 (merged 2026-06-19) changed GET /api/v4/orbit/status from a flat health object to a nested wrapper.
Edited by Dmitry Gruzd

Merge request reports

Loading