From fa4e5c7bb43db76d2185911942c205e26aafaae8 Mon Sep 17 00:00:00 2001 From: Travis Downs Date: Tue, 19 Jul 2022 15:31:37 -0700 Subject: [PATCH] Fix json -> object mapping in cluster health rpk cluster health would never show any leaderless partitoins because of a missing s in the json mapping: leaderless_partition (incorrect) vs leaderless_partitions (correct). Fixes #5521. --- src/go/rpk/pkg/api/admin/api_cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/rpk/pkg/api/admin/api_cluster.go b/src/go/rpk/pkg/api/admin/api_cluster.go index c3478188d5fb..130184c231cd 100644 --- a/src/go/rpk/pkg/api/admin/api_cluster.go +++ b/src/go/rpk/pkg/api/admin/api_cluster.go @@ -20,7 +20,7 @@ type ClusterHealthOverview struct { ControllerID int `json:"controller_id"` AllNodes []int `json:"all_nodes"` NodesDown []int `json:"nodes_down"` - LeaderlessPartitions []string `json:"leaderless_partition"` + LeaderlessPartitions []string `json:"leaderless_partitions"` } func (a *AdminAPI) GetHealthOverview(ctx context.Context) (ClusterHealthOverview, error) {