Skip to content
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

[Backport 2.x] Fix the support of RestClient Node Sniffer for version 2.x and update tests #3521

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport ab478ba from #3487

… tests (#3487)

Fix the support of RestClient Node Sniffer for OpenSearch 2.x, and update unit tests for OpenSearch.
The current code contains the logic to be compatible with Elasticsearch 2.x version, which is conflict with OpenSearch 2.x, so removed that part of legacy code.

* Update the script create_test_nodes_info.bash to dump the response of Nodes Info API GET _nodes/http for OpenSearch 1.0 and 2.0 version, which used for unit test.
* Remove the support of Elasticsearch version 2.x for the Sniffer
* Update unit test to validate the Sniffer compatible with OpenSearch 1.x and 2.x
* Update the API response parser to meet the array notation (in ES 6.1 and above) for the node attributes setting. It will result the value of `node.attr` setting will not be parsed as array in the Sniffer, when using the Sniffer on cluster in Elasticsearch 6.0 and above.
* Replace "master" node role with "cluster_manager" in unit test

Signed-off-by: Tianli Feng <ftianli@amazon.com>
(cherry picked from commit ab478ba)
@opensearch-trigger-bot opensearch-trigger-bot bot requested review from a team and reta as code owners June 6, 2022 20:42
@tlfeng tlfeng added backport PRs or issues specific to backporting features or enhancments v2.1.0 Issues and PRs related to version 2.1.0 bug Something isn't working Clients Clients within the Core repository such as High level Rest client and low level client labels Jun 6, 2022
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 9501b81
Log 5810

Reports 5810

@tlfeng tlfeng merged commit c449097 into 2.x Jun 6, 2022
@github-actions github-actions bot deleted the backport/backport-3487-to-2.x branch June 6, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments bug Something isn't working Clients Clients within the Core repository such as High level Rest client and low level client v2.1.0 Issues and PRs related to version 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants