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] Pass localNode info to all plugins on node start #8192

Merged

Conversation

DarshitChanpura
Copy link
Member

Description

Manually backports #7919 to 2.x

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…earch-project#7919)

* Updates Node start to now pass localNode info so that it is available directly to a plugin instead of hacky implementation

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds this PR to changelog

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Makes onNodeStarted call plugin agnostic

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Marking onNodeStarted() as deprecated

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds a test to verify the behaviour of new signature of onNodeStarted

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates test to also check for nodeId

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds instructions to use the overloaded implementation of onNodeStarted and adds a test to check that current plugins are not affect with this implementation

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

---------

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
(cherry picked from commit 40d7583)
@DarshitChanpura DarshitChanpura force-pushed the backport/backport-7919-to-2.x branch from 404f6f5 to 6deb8c3 Compare June 21, 2023 13:50
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=pit/10_basic/Delete all}
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testPressureServiceStats

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #8192 (a9c9664) into 2.x (efd12df) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                2.x    #8192   +/-   ##
=========================================
  Coverage     70.64%   70.65%           
+ Complexity    56851    56849    -2     
=========================================
  Files          4703     4703           
  Lines        269104   269106    +2     
  Branches      39774    39774           
=========================================
+ Hits         190118   190131   +13     
- Misses        62702    62726   +24     
+ Partials      16284    16249   -35     
Impacted Files Coverage Δ
server/src/main/java/org/opensearch/node/Node.java 85.99% <100.00%> (ø)
...ain/java/org/opensearch/plugins/ClusterPlugin.java 83.33% <100.00%> (+33.33%) ⬆️

... and 421 files with indirect coverage changes

@reta reta merged commit fced6d4 into opensearch-project:2.x Jun 21, 2023
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
…search-project#8192)

* [Enhancement] Pass localNode info to all plugins on node start (opensearch-project#7919)

* Updates Node start to now pass localNode info so that it is available directly to a plugin instead of hacky implementation

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds this PR to changelog

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Makes onNodeStarted call plugin agnostic

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Marking onNodeStarted() as deprecated

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds a test to verify the behaviour of new signature of onNodeStarted

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates test to also check for nodeId

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds instructions to use the overloaded implementation of onNodeStarted and adds a test to check that current plugins are not affect with this implementation

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

---------

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
(cherry picked from commit 40d7583)

* Adds a CHANGELOG entry

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

---------

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants