Skip to content

feat(cli): add cluster metadata command with table/list output modes#2639

Open
sagar-shaw-bits wants to merge 12 commits intoapache:masterfrom
sagar-shaw-bits:master
Open

feat(cli): add cluster metadata command with table/list output modes#2639
sagar-shaw-bits wants to merge 12 commits intoapache:masterfrom
sagar-shaw-bits:master

Conversation

@sagar-shaw-bits
Copy link

Which issue does this PR close?

Closes #2634

Rationale

The iggy server exposes cluster metadata via ClusterClient::get_cluster_metadata(), but there was no CLI command to access this information. Users need a way to view cluster topology and node information from the command line.

What changed?

Previously, users had no way to query cluster metadata from the CLI. The iggy cluster metadata command now exposes cluster information including node names, IP addresses, transport endpoints (TCP/QUIC/HTTP/WebSocket ports), roles (Leader/Follower), and status. Output is available in both table and list formats via the --list-mode parameter.

Local Execution

Passed.

AI Usage

  1. GitHub Copilot and Claude AI
  2. Code structure, boilerplate generation, match statements for status/role conversions and table formatting
  3. Verified against existing CLI patterns, manual code review of all imports and trait implementations, confirmed all ClusterNodeStatus variants handled, rustfmt syntax check passed
  4. Yes, can explain every line of code and design decisions

@hubcio
Copy link
Contributor

hubcio commented Jan 29, 2026

hello, thanks for contribution, however tests are missing. check core/integration/tests/cli and test it like the rest of commands.
(start server with cluster enabled, it should return a list of nodes in cluster)

@sagar-shaw-bits
Copy link
Author

Hi @hubcio, Thanks for the feedback! Tests have been added to test_cluster_metadata_command.rs. Could you please re-review again. Thanks in advance!

@hubcio hubcio changed the title feat: add cluster metadata command with table/list output modes feat(cli): add cluster metadata command with table/list output modes Jan 30, 2026
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.

Implement GetClusterMetadata command for iggy CLI

2 participants