Skip to content

domains list has no machine-readable output, so the gem cannot report hold state #121

Description

@mhenrixon

Problem

kamal-proxy domains list prints a Cobra table. The data behind it — DomainsStatusResponse, including per-domain Quarantine entries with until, failures and kind — is already structured on the RPC, but the only way out of the binary is the rendered table.

That blocks the gem. dash doctor wants to tell an operator mid-DNS-cutover "certificate issuance held until 14:32 (preflight)", which was the original goal of zoolutions/dash#126. Getting there today means running docker exec kamal-proxy domains list over SSH and scraping columns out of human-readable output — brittle against any future column change, and a poor failure mode inside a read-only diagnostic. So dash#126 shipped a weaker message instead: for ACME-issued domains whose DNS does not yet point at the proxy, it says no certificate can be issued until it does and that the proxy handles it automatically. True and useful, but it cannot name the hold or when it lifts.

Suggested shape

A --json flag on domains list (and plausibly domains stats), emitting DomainsStatusResponse more or less as-is. There is precedent in this codebase: kamal-proxy list --json already exists (internal/cmd/list.go), and the gem already calls it that way via Dash::Commands::Loadbalancer#list(json: true).

Rough scope:

  • internal/cmd/domains.go — add the flag to domainsListCommand, and marshal the response instead of building a table when it is set. Follow whatever list --json does so the two behave alike.
  • Keep the table the default. The gem opts in; humans keep what they have.
  • Worth confirming the JSON tags on DomainsStatusResponse, DomainStatus, RegisteredDomainStatus and QuarantineStatus read well as a public surface, since making them machine-readable makes them a contract.

Follow-on in the gem

Once this ships and MINIMUM_VERSION names it, dash doctor can read real hold state — replacing the generic message added in dash#126 with the specific one, and degrading to the generic form against an older proxy.

Not urgent. The automatic release means a hold usually clears itself before anyone looks, so this improves diagnosis rather than fixing a broken path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions