Skip to content

Commit

Permalink
Fix json -> object mapping in cluster health
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
travisdowns committed Jul 19, 2022
1 parent d54ae48 commit fa4e5c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/api/admin/api_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa4e5c7

Please sign in to comment.