sagar-shaw-bits opened a new pull request, #2639: URL: https://github.com/apache/iggy/pull/2639
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Closes #2634 ## Rationale <!-- Why is this change needed? If the issue explains it well, a one-liner is fine. --> 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? <!-- 2-4 sentences. Problem first (before), then solution (after). GOOD: "Messages were unavailable when background message_saver committed the journal and started async disk I/O before completion. Polling during this window found neither journal nor disk data. The fix freezes journal batches in the in-flight buffer before async persist." GOOD: "When many small messages accumulate in the journal, the flush passes thousands of IO vectors to writev(), exceeding IOV_MAX (1024 on Linux)." BAD: - Walls of text - "This PR adds..." (we can see the diff) --> 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. <!-- You must run your code locally before submitting. "Relying on CI" is not acceptable - PRs from authors who haven't run the code will be closed. --> ## AI Usage <!-- If AI tools were used, please answer: 1. Which tools? (e.g., GitHub Copilot, Claude, ChatGPT) 2. Scope of usage? (e.g., autocomplete, generated functions, entire implementation) 3. How did you verify the generated code works correctly? 4. Can you explain every line of the code if asked? If no AI tools were used, write "None" or delete this section. --> 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
