-
Notifications
You must be signed in to change notification settings - Fork 58
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
Make NamedXContent available to extensions #244
Conversation
Signed-off-by: Daniel Widdis <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #244 +/- ##
============================================
+ Coverage 67.19% 70.84% +3.65%
- Complexity 102 115 +13
============================================
Files 24 25 +1
Lines 506 542 +36
Branches 17 17
============================================
+ Hits 340 384 +44
+ Misses 154 146 -8
Partials 12 12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
3c26ebd
to
1fce412
Compare
@dbwiddis if we can add a design for getNamedXContent() in DESIGN.md would be great. |
src/main/java/org/opensearch/sdk/handlers/ExtensionsInitRequestHandler.java
Show resolved
Hide resolved
#94 talks about retry for handling transport errors by doing a retry. Are we handling it in this PR? |
Sure, I'll provide one. It's a good template for other similar extension points. |
cbf203f
to
1a83f71
Compare
1a83f71
to
637de34
Compare
637de34
to
8775ae8
Compare
8775ae8
to
a53d20a
Compare
Signed-off-by: Daniel Widdis <[email protected]>
a53d20a
to
9285fe1
Compare
* Make NamedXContent available to extensions Signed-off-by: Daniel Widdis <[email protected]> * Add tests Signed-off-by: Daniel Widdis <[email protected]> * No need to save custom list in registry as it's on ExtensionsRunner Signed-off-by: Daniel Widdis <[email protected]> * Add sequence diagram to DESIGN.md Signed-off-by: Daniel Widdis <[email protected]> Signed-off-by: Daniel Widdis <[email protected]>
Description
Implements the
getNamedXContent()
extension point:getNamedXContent()
to theExtension
interface, so that the ExtensionsRunner can read it. This will allow direct use of existing plugin method of this name.ExtensnionNamedXContentRegistry
which combines the Extension's custom content and the core XContent from OpenSearch.Getters fetch either the combined registry (needed as an input for various parsers) or just the custom content (presently unused, but potentially available for transport request/response(no need, functionality already on ExtensionsRunner)ExtensionNamedXContentRegistry
via a getter to extensions so they can easily integrate them into REST Handlers by:extensionsRunner
object from the Extension (inherited fromBaseExtension
) to the RestHandlerextensionsRunner.getNamedXContentRegistry().getRegistry()
to return the (combined) registry to pass to parsersSee AD #725 for an implementation leveraging these improvements!
Issues Resolved
Fixes #208
Fixes #131
Fixes #94
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.