Skip to content

[Feature/extensions] Only send one extension info when initializing#4302

Merged
saratvemulapalli merged 1 commit intoopensearch-project:feature/extensionsfrom
dbwiddis:initOneExtension
Aug 27, 2022
Merged

[Feature/extensions] Only send one extension info when initializing#4302
saratvemulapalli merged 1 commit intoopensearch-project:feature/extensionsfrom
dbwiddis:initOneExtension

Conversation

@dbwiddis
Copy link
Copy Markdown
Member

Companion PR: opensearch-project/opensearch-sdk-java#103

Description

Sends a single DiscoveryExtension object when initializing an extension, rather than the entire list.

Issues Resolved

Fixes opensearch-project/opensearch-sdk-java#93

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

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
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

DiscoveryExtension discoveryExtension = new DiscoveryExtension(
extension.getName(),
extension.getDescription(),
extension.getVersion(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are we not considering Description and Version of the extension?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay I see. We are getting it from PluginInfo. Ignore my comment here

Copy link
Copy Markdown
Member Author

@dbwiddis dbwiddis Aug 26, 2022

Choose a reason for hiding this comment

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

For clarity (and for other reviewers), there are no changes to this try/catch code block other than the indentation caused by the else. Github's diff is confused. :-)

* TODO change DiscoveryNode to Extension information
*/
private final List<DiscoveryExtension> extensions;
private final DiscoveryExtension extension;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The initial intention for this was to help the extension understand which extensions are installed in the system.
If the dependencies of extension being initialized don't exist, it should fail the init.

I love this simple approach not thinking too far ahead, @dbwiddis could you open an issue to design how can extensions discover if its dependencies exist.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exist and are initialized.... something the orchestrator knows... but we don't yet have a "depends on" field in extensions or which field (uniqueID?) is used to ID that other extension. I'll open a tracking issue as still many unknowns there.

@saratvemulapalli
Copy link
Copy Markdown
Member

Gradle Check (Jenkins) Run Completed with:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':plugins:analysis-icu:compileInternalClusterTestJava'.
> Java heap space

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':modules:lang-expression:compileInternalClusterTestJava'.
> java.lang.OutOfMemoryError: Java heap space

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
==============================================================================

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

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