Skip to content

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

Merged
tlfeng merged 1 commit into2.0from
backport/backport-3487-to-2.0
Jun 6, 2022
Merged

[Backport 2.0] Fix the support of RestClient Node Sniffer for version 2.x and update tests#3522
tlfeng merged 1 commit into2.0from
backport/backport-3487-to-2.0

Conversation

@opensearch-trigger-bot
Copy link
Copy Markdown
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 a review from a team as a code owner June 6, 2022 20:42
@tlfeng tlfeng added bug Something isn't working backport PRs or issues specific to backporting features or enhancments 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
Copy Markdown
Collaborator

✅   Gradle Check success e026a17
Log 5809

Reports 5809

@tlfeng tlfeng merged commit aeaa585 into 2.0 Jun 6, 2022
@github-actions github-actions bot deleted the backport/backport-3487-to-2.0 branch June 6, 2022 21:34
@tlfeng tlfeng added the v2.0.1 label Jun 10, 2022
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.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants