OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

[Feature/extensions] Provide Extension API to OpenSearch

Open dbwiddis opened this issue 3 years ago • 12 comments

Signed-off-by: Daniel Widdis [email protected]

Description

Companion PR: https://github.com/opensearch-project/opensearch-sdk/pull/74

Extensions will report their APIs to the ExtensionsOrchestrator upon initial registration and potentially later in the Extension's lifecycle. These APIs will be registered and mapped so that when Users submit API requests they can be forwarded to the appropriate extensions.

This PR handles the communication of the REST API from the Extension to OpenSearch. Future PRs will complete the process of registering the REST Handlers and redirecting inbound requests.

Issues Resolved

Fixes https://github.com/opensearch-project/opensearch-sdk/issues/68

Check List

  • [x] New functionality includes testing.
    • [x] All tests pass
  • [x] New functionality has been documented.
    • [x] New functionality has javadoc added
  • [x] Commits are signed per the DCO using --signoff

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.

dbwiddis avatar Aug 02 '22 21:08 dbwiddis

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1315/
  • CommitID: 6aeb8feffe994525154a8e47c82d8cc4ae0f7c30

github-actions[bot] avatar Aug 02 '22 22:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1328/
  • CommitID: c756aa1628f27c31e3bf9e6190b6f3d5f7617990

github-actions[bot] avatar Aug 03 '22 04:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1329/
  • CommitID: 956178fd1dcc85c916826eba2cc6fc145533385e

github-actions[bot] avatar Aug 03 '22 05:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1333/
  • CommitID: f369987e5bfbd02a75288229c4b0c67db2073bcd

github-actions[bot] avatar Aug 03 '22 05:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1336/
  • CommitID: a31ab795f89fe8e24df9b988f6bd15144f46deec

github-actions[bot] avatar Aug 03 '22 05:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1337/
  • CommitID: 728e376eb75bad57bfa6a1e1eff759da81220019

github-actions[bot] avatar Aug 03 '22 05:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1423/
  • CommitID: 7cd912676dd420376904bfad0aa48900a2c3a948

github-actions[bot] avatar Aug 04 '22 04:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1448/
  • CommitID: 534f97641b91da456d9242597cdb1d0a77b5e8d7

github-actions[bot] avatar Aug 04 '22 16:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1450/
  • CommitID: 3a7f564c2b0474fbc9dafd6a8c85e68fb76c8d68

github-actions[bot] avatar Aug 04 '22 17:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1461/
  • CommitID: 9cbe1c5ad63091f0489a69a50fd6939e095a73be

github-actions[bot] avatar Aug 04 '22 21:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1463/
  • CommitID: 54498eab0b4d703b46e55bec91d9ad1d3e4112e5

github-actions[bot] avatar Aug 04 '22 22:08 github-actions[bot]

Codecov Report

Merging #4100 (4e75c43) into feature/extensions (ff2846a) will increase coverage by 0.06%. The diff coverage is 77.51%.

@@                   Coverage Diff                    @@
##             feature/extensions    #4100      +/-   ##
========================================================
+ Coverage                 70.68%   70.75%   +0.06%     
- Complexity                57173    57284     +111     
========================================================
  Files                      4612     4625      +13     
  Lines                    274812   275465     +653     
  Branches                  40227    40289      +62     
========================================================
+ Hits                     194245   194898     +653     
+ Misses                    64299    64280      -19     
- Partials                  16268    16287      +19     
Impacted Files Coverage Δ
...nsearch/gradle/testclusters/OpenSearchCluster.java 0.00% <0.00%> (ø)
...opensearch/gradle/testclusters/OpenSearchNode.java 0.00% <0.00%> (ø)
...ava/org/opensearch/client/RestHighLevelClient.java 44.32% <ø> (-0.16%) :arrow_down:
...gregations/metrics/GeoBoundsAggregatorFactory.java 88.88% <ø> (ø)
...search/aggregations/metrics/InternalGeoBounds.java 62.96% <ø> (ø)
...o/search/aggregations/metrics/ParsedGeoBounds.java 88.00% <ø> (ø)
...lustermanager/info/TransportClusterInfoAction.java 61.53% <ø> (ø)
.../org/opensearch/client/support/AbstractClient.java 34.86% <0.00%> (+0.07%) :arrow_up:
.../java/org/opensearch/cluster/ack/AckedRequest.java 0.00% <0.00%> (ø)
...main/java/org/opensearch/common/lucene/Lucene.java 66.87% <ø> (ø)
... and 545 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 04 '22 22:08 codecov-commenter

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1706/
  • CommitID: 989fcdba4300ea5dadfb44ba8628916497b7d630

github-actions[bot] avatar Aug 13 '22 18:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1745/
  • CommitID: a4f81b20b4d5ca1d15c6f2f98073886f0af20aea

github-actions[bot] avatar Aug 15 '22 22:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1749/
  • CommitID: 3dd56a89224549439ba0c69f02cae4828b827e46

github-actions[bot] avatar Aug 16 '22 01:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1806/
  • CommitID: 57c680055889f83dcd852ecffe6af05e3f0e2306

github-actions[bot] avatar Aug 17 '22 01:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1808/
  • CommitID: b48e63bae5a6c0ea2f9cbc288665931f4cc08078

github-actions[bot] avatar Aug 17 '22 01:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1817/
  • CommitID: ad5a22c9c37140dbcfeb049f9a2e1ef6bcd70dfd

github-actions[bot] avatar Aug 17 '22 05:08 github-actions[bot]

Gradle check is failing because we didn't merge the changes for 2.2.

* What went wrong:
Execution failed for task ':distribution:bwc:staged:buildBwcLinuxTar'.
> Building 2.2.0 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/staged/build/bwc/checkout-2.2/distribution/archives/linux-tar/build/distributions/opensearch-min-2.2.0-SNAPSHOT-linux-x64.tar.gz

saratvemulapalli avatar Aug 18 '22 17:08 saratvemulapalli

I've merged the changes from main to feature/extensions. Could you re-base and that should get gradle green.

saratvemulapalli avatar Aug 18 '22 18:08 saratvemulapalli

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1909/
  • CommitID: 4cbd4b27d7e15f5bf2828add10ede0382f8cbbbc

github-actions[bot] avatar Aug 18 '22 22:08 github-actions[bot]

Precommit failing

> Task :server:compileJava
/home/runner/work/OpenSearch/OpenSearch/server/src/main/java/org/opensearch/extensions/ExtensionsOrchestrator.java:232: error: cannot find symbol
                    extensionsList.add(de);
                                       ^
  symbol:   variable de
  location: class ExtensionsOrchestrator
/home/runner/work/OpenSearch/OpenSearch/server/src/main/java/org/opensearch/extensions/ExtensionsOrchestrator.java:233: error: cannot find symbol
                    extensionIdMap.put(extension.getUniqueId(), de);
                                                                ^
  symbol:   variable de

owaiskazi19 avatar Aug 18 '22 22:08 owaiskazi19

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1910/
  • CommitID: d3a2560bb2bd65406de2bb71c707bbd2e8c1dfe2

github-actions[bot] avatar Aug 18 '22 23:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1911/
  • CommitID: 3794d6a4d81e98454ddf13c7ce2d6d5985bf54c9

github-actions[bot] avatar Aug 18 '22 23:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1912/
  • CommitID: 3794d6a4d81e98454ddf13c7ce2d6d5985bf54c9

github-actions[bot] avatar Aug 18 '22 23:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1913/
  • CommitID: 3794d6a4d81e98454ddf13c7ce2d6d5985bf54c9

github-actions[bot] avatar Aug 19 '22 01:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: :x:
  • URL:
  • CommitID: 3794d6a4d81e98454ddf13c7ce2d6d5985bf54c9

github-actions[bot] avatar Aug 19 '22 01:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1919/
  • CommitID: 3794d6a4d81e98454ddf13c7ce2d6d5985bf54c9

github-actions[bot] avatar Aug 19 '22 04:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1939/
  • CommitID: 156dc9da620201eed7e29f72f082b12cf55e97f7

github-actions[bot] avatar Aug 19 '22 16:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1940/
  • CommitID: 156dc9da620201eed7e29f72f082b12cf55e97f7

github-actions[bot] avatar Aug 19 '22 17:08 github-actions[bot]