Skip to content

Commit

Permalink
Add support for minimum compatible version for Extensions and OpenSea…
Browse files Browse the repository at this point in the history
…rch (#365)

* Updating extensions config file

Signed-off-by: Sarat Vemulapalli <[email protected]>

* Updating with new ExtensionNode class def

Signed-off-by: Sarat Vemulapalli <[email protected]>

* Updating docs

Signed-off-by: Sarat Vemulapalli <[email protected]>

* Addressing comments

Signed-off-by: Sarat Vemulapalli <[email protected]>

* Adding more changes

Signed-off-by: Sarat Vemulapalli <[email protected]>

---------

Signed-off-by: Sarat Vemulapalli <[email protected]>
  • Loading branch information
saratvemulapalli authored Feb 2, 2023
1 parent 603c878 commit 1e9dc4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
9 changes: 6 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ Here is an example extension configuration `extensions.yml`:
extensions:
- name: sample-extension // extension name
uniqueId: opensearch-sdk-1 // identifier for the extension
hostName: 'sdk_host' // name of the host where extension is running
hostAddress: '127.0.0.1' // host to reach
port: '4532' // port to reach
version: '1.0' // extension version
description: Extension for the Opensearch SDK Repo // description of the extension
opensearchVersion: '3.0.0' // OpenSearch compatibility
opensearchVersion: '3.0.0' // Compiled with OpenSearch version
minimumCompatibleVersion: '3.0.0' // Minimum version of OpenSearch the extension is wire compatible with
```

### Communication
Expand All @@ -74,6 +73,10 @@ The sequence diagram below shows the process of initializing an Extension, regis

The `org.opensearch.sdk.sample` package contains a sample `HelloWorldExtension` implementing the below steps. It is executed following the steps in the [`DEVELOPER_GUIDE`](DEVELOPER_GUIDE.md).

#### Wire Compatibility

Extensions will be wire compatible across minor and patch versions. The configuration contains `minimumCompatibleVersion` which is validated by ExtensionsManager in OpenSearch.

#### Extension REST Actions Walk Through

![](Docs/ExtensionRestActions.svg)
Expand Down
7 changes: 1 addition & 6 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,11 @@ A sample `extensions.yml` file is shown below. The `uniqueId` will be used in RE
extensions:
- name: hello-world
uniqueId: opensearch-sdk-java-1
hostName: 'sdk_host'
hostAddress: '127.0.0.1'
port: '4532'
version: '1.0'
description: Extension for the Opensearch SDK Repo
opensearchVersion: '3.0.0'
javaVersion: '14'
className: ExtensionsRunner
customFolderName: opensearch-sdk-java
hasNativeController: false
minimumCompatibleVersion: '3.0.0'
```

#### Run OpenSearch
Expand Down
7 changes: 2 additions & 5 deletions src/test/java/org/opensearch/sdk/TestExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,10 @@ public void testHandleExtensionInitRequest() throws UnknownHostException {
DiscoveryExtensionNode extension = new DiscoveryExtensionNode(
EXTENSION_NAME,
"opensearch-sdk-1",
"",
"",
"",
sourceNode.getAddress(),
new HashMap<String, String>(),
null,
null,
Version.fromString("3.0.0"),
Version.fromString("3.0.0"),
new ArrayList<ExtensionDependency>()
);

Expand Down

0 comments on commit 1e9dc4e

Please sign in to comment.