[go: up one dir, main page]

Skip to content

cli: Add JSON output format to gitaly cluster commands

The cluster info and cluster get-partition commands currently output data only in human-readable TUI format with colored tables. This format is not suitable for programmatic consumption or automation workflows that need to parse cluster statistics, partition details, and replica information.

This MR adds a --format flag to both commands, accepting "text" (default) or "json" values. The JSON output uses protojson marshaling to preserve protobuf field names in lowerCamelCase format, ensuring consistency with the gRPC API and protobuf definitions.

The JSON output structure mirrors protobuf definitions, making it easy to integrate with monitoring systems, automation scripts, and other tools that need structured cluster information.

Merge request reports

Loading