[Extensions]Add query for initialized extensions#5658
[Extensions]Add query for initialized extensions#5658owaiskazi19 merged 13 commits intoopensearch-project:mainfrom
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
dbwiddis
left a comment
There was a problem hiding this comment.
Great progress. A few more tweaks needed.
| } | ||
|
|
||
| public ExtensionRequest(StreamInput in) throws IOException { | ||
| super(in); |
There was a problem hiding this comment.
I believe Requests require the super(in) while responses do not. This should definitely match the writeTo implementation; I don't expect it will pass tests without it matching.
| this(requestType, null); | ||
| } | ||
|
|
||
| public ExtensionRequest(ExtensionsManager.RequestType requestType, Optional<String> uniqueId) { |
There was a problem hiding this comment.
Don't make the user provide an optional. Just take a @Nullable String parameter here, and then set this.uniqueId the same way you do in the stream constructor. Given the overloaded constructor above, this would set the optional to null and break things later.
| if (o == null || getClass() != o.getClass()) return false; | ||
| ExtensionRequest that = (ExtensionRequest) o; | ||
| return Objects.equals(requestType, that.requestType); | ||
| return Objects.equals(requestType, that.requestType) && uniqueId.equals(that.uniqueId); |
There was a problem hiding this comment.
(Style) use the same comparison format (either Objects.equals() or direct equals comparison) for both.
| private static final Logger logger = LogManager.getLogger(ExtensionRequest.class); | ||
| private ExtensionsManager.RequestType requestType; | ||
| private final ExtensionsManager.RequestType requestType; | ||
| private final Optional<String> uniqueId; |
There was a problem hiding this comment.
It looks like there is no test class for ExtensionRequest so you should create one and include a test of this uniqueID, both in the null case (single arg constructor) or value present case (two arg constructor)
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #5658 +/- ##
============================================
- Coverage 70.98% 70.97% -0.02%
- Complexity 58669 58685 +16
============================================
Files 4763 4765 +2
Lines 279945 280009 +64
Branches 40418 40430 +12
============================================
+ Hits 198731 198738 +7
- Misses 64988 65084 +96
+ Partials 16226 16187 -39
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/extensions/DiscoveryExtensionNode.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
|
@mloufra can you resolve conflicts with changelog.md? |
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
Signed-off-by: Frank Lou <mloufra@amazon.com>
cc87d2a to
cc1f2d9
Compare
Gradle Check (Jenkins) Run Completed with:
|
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-5658-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e24de72df5cc1ae7a44f84e216518b916f0c7cf5
# Push it to GitHub
git push --set-upstream origin backport/backport-5658-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.xThen, create a pull request where the |
| - Add support for ppc64le architecture ([#5459](https://github.com/opensearch-project/OpenSearch/pull/5459)) | ||
| - Added @gbbafna as an OpenSearch maintainer ([#5668](https://github.com/opensearch-project/OpenSearch/pull/5668)) | ||
| - Added support for feature flags in opensearch.yml ([#4959](https://github.com/opensearch-project/OpenSearch/pull/4959)) | ||
| - Add query for initialized extensions ([#5658](https://github.com/opensearch-project/OpenSearch/pull/5658)) |
There was a problem hiding this comment.
@owaiskazi19 Just a heads up, but since this change was to be backported and released in 2.x, this changelog entry should have gone in the [Unreleased 2.x] section of this file. I'm working on cleaning up the changelog on main right now.
Signed-off-by: Frank Lou mloufra@amazon.com
Description
Create a feature to have an extension query to OpenSearch to obtain a list of initialized extensions and determine whether a particular extension is initialized.
Equivalent PR on OpenSearch-sdk-java : opensearch-project/opensearch-sdk-java#300
Issues Resolved
fixes opensearch-project/opensearch-sdk-java#149
Check List
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.