Skip to content

feat: add status command that displays readiness information and shor… - #816

Open
DerBurri wants to merge 3 commits into
mainfrom
feature-status-command
Open

DerBurri wants to merge 3 commits into
mainfrom
feature-status-command

Conversation

@DerBurri

@DerBurri DerBurri commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Adds a status command that reports whether a Codesphere installation is reachable and ready, rendered neofetch-style.

Until now the only way to answer "is this installation up?" was to run a smoke test, which provisions real resources and takes minutes. status is a read-only probe that answers the same question in one request, so it is safe to run against production and cheap enough to poll in a deploy pipeline.

Usage

oms status codesphere --baseurl https://codesphere.example.com/api --token $TOKEN

Example output (the logo is printed in the Codesphere purple and turquoise):

         ▄▄▄████▄▄▄         codesphere@codesphere.example.com
      ▄████▀▀▀▀▀▀████▄      ---------------------------------
    ▄███▀    ▄▄    ▀███▄    Status: Ready
   ▄██▀  ▄████████▄  ▀██▄   Latency: 87ms
   ██▀  ███▀    ▀███  ▀██   Teams: 3
  ███  ▄██        ██▄  ███  Plans: 6
  ███  ▀██        ██▀  ███
   ██▄  ███▄    ▄███  ▄██
   ▀██▄  ▀████████▀  ▄██▀
    ▀███▄    ▀▀    ▄███▀
      ▀████▄▄▄▄▄▄████▀
         ▀▀▀████▀▀▀

With --wait, the command blocks and retries every 5s until the installation comes up or --timeout (default 5m) elapses, and reports the attempt count:

    ▄███▀    ▄▄    ▀███▄    Status: Not Ready
   ▄██▀  ▄████████▄  ▀██▄   Latency: 2s
   ██▀  ███▀    ▀███  ▀██   Error: dial tcp: connection refused
  ███  ▄██        ██▄  ███  Attempts: 12

The command exits non-zero when the installation is not ready, so it can gate a pipeline step directly.

Readiness is determined by ListWorkspacePlans: it is authenticated, cheap and has no side effects, and its result also gives the plan count. The team count comes from a best-effort follow-up call, and a failure there does not mark the installation as not ready.

The readiness logic lives in internal/codesphere/status rather than in the cobra command, so the test playlist runner in #843 reuses it as its status step. #843 is built on top of this PR, so this one should be merged first.

Important Context to the PR

  • This change introduces a breaking change and for that I cleared it with relevant stakeholders upfront and added an explanation to the PR description. Breaking can e.g. mean that this new installer can not install older versions of Codesphere

@DerBurri
DerBurri requested a review from siherrmann September 16, 2026 14:40
@DerBurri DerBurri self-assigned this Sep 16, 2026
@DerBurri
DerBurri force-pushed the feature-status-command branch 5 times, most recently from 7489592 to 68b0172 Compare September 23, 2026 08:15
DerBurri and others added 2 commits September 23, 2026 10:18
Signed-off-by: DerBurri <max@codesphere.com>
Signed-off-by: DerBurri <7892993+DerBurri@users.noreply.github.com>
@DerBurri
DerBurri force-pushed the feature-status-command branch from 7251b04 to cbcb120 Compare September 23, 2026 08:18
Signed-off-by: DerBurri <7892993+DerBurri@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant