Skip to content

Add shards_capacity to health_report #2146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Add shards_capacity to health_report #2146

merged 1 commit into from
Jun 23, 2023

Conversation

JoshMock
Copy link
Member

Adds new shards_capacity to the health API.

My first time making a spec change so let me know if I missed anything important here. 🙏

Done per @rudolf's needs mentioned in elastic/kibana#159587 (comment).

@github-actions
Copy link
Contributor

Following you can find the validation results for the API you have changed.

API Status Request Response
health_report 🟢 3/3 3/3

You can validate this API yourself by using the make validate target.

@JoshMock JoshMock requested a review from a team June 21, 2023 18:39
Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +177 to +180
export class ShardsCapacityIndicatorDetails {
data: ShardsCapacityIndicatorTierDetail
frozen: ShardsCapacityIndicatorTierDetail
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern where all fields are of the same type could also be a Dictionary<string, SomeType> to allow for future expansion, or also to account for values we haven't seen in the docs or tests.

In this particular case, looking at the ES code shows that these are hardcoded constants that are unlikely to have new members. So this approach works.

@JoshMock JoshMock merged commit 765a609 into main Jun 23, 2023
@JoshMock JoshMock deleted the shards-capacity branch June 23, 2023 16:32
swallez pushed a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants