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] REST API to initialize an extension and dynamically load #8210

Merged

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Jun 22, 2023

Description

Backport of #8029

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

@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:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

… it (opensearch-project#8029)

* Implemented REST API for initializing extension

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Cleanup extensions.yml design

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Added tests for RestInitializeExtensionAction

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Pulled extensions REST request in extensions directory

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Removed forbidden APIs from rest action and modified tests

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Added entry in changelog

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Added test for parse

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Addressed PR comments

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Addressed PR comments

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Spotless Fixed

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Handled exceptions

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Handled test failure

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testDropPrimaryDuringReplication

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #8210 (efd9bd3) into 2.x (efd12df) will decrease coverage by 0.10%.
The diff coverage is 68.27%.

@@             Coverage Diff              @@
##                2.x    #8210      +/-   ##
============================================
- Coverage     70.64%   70.55%   -0.10%     
+ Complexity    56851    56766      -85     
============================================
  Files          4703     4704       +1     
  Lines        269104   269133      +29     
  Branches      39774    39787      +13     
============================================
- Hits         190118   189881     -237     
- Misses        62702    62912     +210     
- Partials      16284    16340      +56     
Impacted Files Coverage Δ
...c/main/java/org/opensearch/bootstrap/Security.java 33.09% <ø> (+0.23%) ⬆️
.../src/main/java/org/opensearch/env/Environment.java 87.78% <ø> (+0.66%) ⬆️
...rch/extensions/rest/RestActionsRequestHandler.java 100.00% <ø> (ø)
...rch/extensions/rest/RestSendToExtensionAction.java 46.66% <ø> (ø)
.../main/java/org/opensearch/action/ActionModule.java 95.03% <33.33%> (-0.47%) ⬇️
server/src/main/java/org/opensearch/node/Node.java 85.97% <50.00%> (-0.02%) ⬇️
...org/opensearch/extensions/ExtensionDependency.java 66.66% <60.00%> (-7.02%) ⬇️
...a/org/opensearch/extensions/ExtensionsManager.java 43.50% <60.52%> (-13.57%) ⬇️
...extensions/rest/RestInitializeExtensionAction.java 73.01% <73.01%> (ø)
...ain/java/org/opensearch/tasks/CancellableTask.java 80.76% <81.25%> (-6.19%) ⬇️
... and 2 more

... and 468 files with indirect coverage changes

@saratvemulapalli saratvemulapalli merged commit 77d059a into opensearch-project:2.x Jun 26, 2023
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
… it (opensearch-project#8029) (opensearch-project#8210)

* Implemented REST API for initializing extension



* Cleanup extensions.yml design



* Added tests for RestInitializeExtensionAction



* Pulled extensions REST request in extensions directory



* Removed forbidden APIs from rest action and modified tests



* Added entry in changelog



* Added test for parse



* Addressed PR comments



* Addressed PR comments



* Spotless Fixed



* Handled exceptions



* Handled test failure



---------

Signed-off-by: Owais Kazi <owaiskazi19@gmail.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