You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by hg...@apache.org on 2026/10/13 20:34:53 UTC
(iggy) 05/06: fix(cli): preserve cluster metadata list column order
This is an automated email from the ASF dual-hosted git repository.
hubcio pushed a commit to branch feat/partition-routing
in repository https://gitbox.apache.org/repos/asf/iggy.git
commit 3d1b10da85df1b49d56811e99fb57b4730421945
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Tue Oct 13 22:33:55 2026 +0200
fix(cli): preserve cluster metadata list column order
Append replica identity after the existing columns so positional
consumers keep their original field mapping.
---
core/cli/src/commands/binary_cluster/get_cluster_metadata.rs | 4 ++--
core/integration/tests/cli/system/test_cluster_metadata_command.rs | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/cli/src/commands/binary_cluster/get_cluster_metadata.rs b/core/cli/src/commands/binary_cluster/get_cluster_metadata.rs
index fdb63b014..d9c2514f5 100644
--- a/core/cli/src/commands/binary_cluster/get_cluster_metadata.rs
+++ b/core/cli/src/commands/binary_cluster/get_cluster_metadata.rs
@@ -104,7 +104,6 @@ impl CliCommand for GetClusterMetadataCmd {
cluster_metadata.nodes.iter().for_each(|node| {
event!(target: PRINT_TARGET, Level::INFO,
"{}|{}|{}|{}|{}|{}|{}|{}|{}",
- node.replica_id,
node.name,
node.ip,
node.endpoints.tcp,
@@ -112,7 +111,8 @@ impl CliCommand for GetClusterMetadataCmd {
node.endpoints.http,
node.endpoints.websocket,
node.role,
- node.status
+ node.status,
+ node.replica_id
);
});
}
diff --git a/core/integration/tests/cli/system/test_cluster_metadata_command.rs b/core/integration/tests/cli/system/test_cluster_metadata_command.rs
index 85dfb18ad..dc42d60ef 100644
--- a/core/integration/tests/cli/system/test_cluster_metadata_command.rs
+++ b/core/integration/tests/cli/system/test_cluster_metadata_command.rs
@@ -80,8 +80,7 @@ impl IggyCmdTestCase for TestClusterMetadataCmd {
.success()
.stdout(starts_with("Executing get cluster metadata in list mode\n"))
.stdout(contains("Cluster name:"))
- .stdout(contains("leader"))
- .stdout(contains("healthy"));
+ .stdout(contains("|leader|healthy|0\n"));
}
}
}