opensearch-project / opensearch-project/opensearch-java
[BUG] `OpenSearchNodesClient#info` is unable to parse custom roles
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
What is the bug?
When a node exists in the cluster having a (custom) role which is not listed in NodeRole, executing OpenSearchClient#nodes#info fails with a JsonParsingException: Invalid enum 'customrole'.
How can one reproduce the bug?
Start a node in the cluster with a custom role.
What is the expected behavior?
OpenSearchClient#nodes#info should succeed, either stripping the custom role from the list of roles of that node, or returning a collection of strings instead of enums.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with java-client/src/main/java/org/opensearch/client/opensearch/_types/NodeRole.java and trace the OpenSearchClient#nodes#info response parsing. Reproduce the failure with a cluster node using a custom role, then verify that nodes info succeeds and handles the unlisted role according to the chosen expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100