Skip to content

Add --format json to operator CLI commands #383

Description

@aram356

Description

Provide machine-readable output for the operator commands used in CI: active-version, auth status, build, config gc, config validate, deploy, healthcheck, provision and rollback. Main currently provides a JSON format only for config diff.

The interface is decided: each in-scope command accepts --format json, never a boolean --json. Existing human-readable output remains the default. PR #388 contains the proposed implementation and specification but is not merged.

Steps to reproduce

Inspection steps (no commands/tests executed):

  1. Inspect current config-diff-only output format and the other command argument structs.
  2. Inspect provision logging.
  3. Compare current human-oriented results with the schemas and stream policy proposed in PR #388.

Expected behavior

Scripts receive the approved JSON schema on stdout on success and failure; diagnostics and child output cannot corrupt it. Existing invocations and config diff --format json remain compatible.

Impact

Operators currently parse prefixed log lines or unstable prose to gate pipelines and capture deployment/lifecycle results.

Proposed fix

Honor the original process requirement: review and approve the output specification before accepting implementation. The spec must settle enum sharing versus diff-only values, the human format name, stdout/stderr policy, failure representation, version/compatibility guarantees and bundled typed-command stub handling. It must define every command’s result schema.

Review PR #388 against that approved contract, including child-process/log routing and per-command success/failure paths. Its proposed OutputFormat { Text, Json } and versioned envelope are branch choices pending the required approval and merge; do not present them as an existing mainline guarantee.

Done when

  • An output spec resolving all six design questions and per-command schemas is approved; record the approval before implementation acceptance.
  • All nine in-scope commands accept --format json and emit the approved success/failure JSON on stdout.
  • Human-readable output stays the default; existing invocations keep their behavior.
  • No boolean --json flag is added.
  • Diagnostics, logs and child stdout are routed so they cannot corrupt JSON data.
  • config diff --format json remains unchanged, and bundled typed-command stubs follow the approved policy.
  • Tests parse and assert structure for every in-scope command, including failures.
  • CLI docs publish the format/schema and compatibility policy.
  • All required CI gates pass on the merge candidate.

Related

PR #388 is the fully covering open implementation PR; current config-diff-only output format.

Activity

  1. added this to the 202611 milestone on Oct 29, 2026
  2. changed the title [-]Add --json output across the CLI[/-] [+]Add --format json to operator CLI commands[/+] on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions