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

Added createComponent to Extension interface #146

Merged

Conversation

ryanbogan
Copy link
Member

@ryanbogan ryanbogan commented Sep 16, 2022

Signed-off-by: Ryan Bogan [email protected]

Description

Adds createComponent to Extension interface and createsBaseExtension abstract class

Note: This is dependent on getSettings, so it will remain a draft PR for now.

Issues Resolved

#136

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.

@owaiskazi19
Copy link
Member

Will review this after createComponent workflow is merged and integrated.

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start!

As you can see from my comments, you need to add the createComponents() to the interface and then implement (override) it here. You may not need all the same arguments as the plugins, but it's a reasonable start.

Then ExtensionsRunner will call this method during initialization, passing its own objects here.

src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/Extension.java Outdated Show resolved Hide resolved
src/main/java/org/opensearch/sdk/Extension.java Outdated Show resolved Hide resolved
@ryanbogan ryanbogan marked this pull request as ready for review October 5, 2022 17:14
@ryanbogan ryanbogan requested a review from a team October 5, 2022 17:14
Signed-off-by: Ryan Bogan <[email protected]>
dbwiddis
dbwiddis previously approved these changes Oct 6, 2022
Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but needs some followup in new issues.

src/main/java/org/opensearch/sdk/BaseExtension.java Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
Signed-off-by: Ryan Bogan <[email protected]>
ryanbogan and others added 4 commits October 10, 2022 15:54
Signed-off-by: Ryan Bogan <[email protected]>
…t#169)

* Remove duplicate copies of registries in handlers

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

* Move ExtensionRestResponse to OpenSearch

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

* Add a POST request to parse content

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

* Add a DELETE request corresponding to the POST

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

* Add consumed params and content to Extension Responses

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

* Update tests and OpenAPI spec

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

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
…ava into create_component_extension_interface
@dbwiddis dbwiddis merged commit fb90df4 into opensearch-project:main Oct 12, 2022
@dbwiddis dbwiddis mentioned this pull request Oct 12, 2022
@ryanbogan ryanbogan deleted the create_component_extension_interface branch October 12, 2022 16:14
kokibas pushed a commit to kokibas/opensearch-sdk-java that referenced this pull request Mar 17, 2023
* Added createComponent to Extension interface and created BaseExtension abstract class

Signed-off-by: Ryan Bogan <[email protected]>

* Fixed minor error

Signed-off-by: Ryan Bogan <[email protected]>

* Changed create component arguments

Signed-off-by: Ryan Bogan <[email protected]>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <[email protected]>

* Fixed minor errors

Signed-off-by: Ryan Bogan <[email protected]>

* Return consumed params and content from extensions (opensearch-project#169)

* Remove duplicate copies of registries in handlers

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

* Move ExtensionRestResponse to OpenSearch

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

* Add a POST request to parse content

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

* Add a DELETE request corresponding to the POST

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

* Add consumed params and content to Extension Responses

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

* Update tests and OpenAPI spec

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

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

* Fixed minor errors

Signed-off-by: Ryan Bogan <[email protected]>

* Addressed PR Comments

Signed-off-by: Ryan Bogan <[email protected]>

Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: Daniel Widdis <[email protected]>
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.

3 participants