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

[Extensions] Add support for minimum compatible version for extensions with OpenSearch #6003

Conversation

saratvemulapalli
Copy link
Member

@saratvemulapalli saratvemulapalli commented Jan 25, 2023

Signed-off-by: Sarat Vemulapalli vemulapallisarat@gmail.com

Description

Part of opensearch-project/opensearch-sdk-java#346.
Added support to define minimum compatible version for extensions talking to OpenSearch.
As we are limiting to minor version compatibility for now, we will revisit this validation when major version compatibility is in the works.
Also, cleaning up unnecessary config needed for extensions as most of it is inherited from plugins back in the day.

Issues Resolved

Closes opensearch-project/opensearch-sdk-java#65

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
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2023

Codecov Report

Merging #6003 (c899c1a) into main (ebb5813) will decrease coverage by 0.09%.
The diff coverage is 86.95%.

❗ Current head c899c1a differs from pull request most recent head c081cdd. Consider uploading reports for the commit c081cdd to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6003      +/-   ##
============================================
- Coverage     70.75%   70.67%   -0.09%     
+ Complexity    58721    58689      -32     
============================================
  Files          4774     4774              
  Lines        280903   280876      -27     
  Branches      40582    40582              
============================================
- Hits         198760   198513     -247     
- Misses        65831    66058     +227     
+ Partials      16312    16305       -7     
Impacted Files Coverage Δ
server/src/main/java/org/opensearch/node/Node.java 83.13% <50.00%> (-0.10%) ⬇️
.../org/opensearch/extensions/ExtensionsSettings.java 42.30% <66.66%> (+0.74%) ⬆️
.../opensearch/extensions/DiscoveryExtensionNode.java 78.12% <100.00%> (+4.05%) ⬆️
...a/org/opensearch/extensions/ExtensionsManager.java 46.06% <100.00%> (-1.40%) ⬇️
...main/java/org/opensearch/node/NodeMocksPlugin.java 0.00% <0.00%> (-100.00%) ⬇️
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...ava/org/opensearch/action/NoSuchNodeException.java 0.00% <0.00%> (-50.00%) ⬇️
...a/org/opensearch/tasks/TaskCancelledException.java 50.00% <0.00%> (-50.00%) ⬇️
.../org/opensearch/client/indices/AnalyzeRequest.java 31.00% <0.00%> (-45.00%) ⬇️
...readonly/TransportVerifyShardIndexBlockAction.java 9.75% <0.00%> (-41.47%) ⬇️
... and 491 more

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: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@saratvemulapalli saratvemulapalli changed the title [Extensions] Refactoring extensions config to have real useable values [Extensions] Add support for minimum compatible version for extensions with OpenSearch Jan 27, 2023
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockWithAReadOnlyBlock
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockWhenAllNodesExceededHighWatermark

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@saratvemulapalli saratvemulapalli merged commit 6176ddc into opensearch-project:main Feb 1, 2023
@saratvemulapalli saratvemulapalli deleted the refactor-extensions-yml branch February 1, 2023 18:24
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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-6003-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6176ddc0ae831095a0e2e8a38b0f475158abef3b
# Push it to GitHub
git push --set-upstream origin backport/backport-6003-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-6003-to-2.x.

saratvemulapalli added a commit to saratvemulapalli/OpenSearch that referenced this pull request Feb 1, 2023
…s with OpenSearch (opensearch-project#6003)

* Refactoring extensions config to have real useable values

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing werror

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing extensions feature flag from gradle run

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing description

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Adding MinimumCompatible Version for extensions

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Adding changelog

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Updating changelog

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Addressing comments

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Addressing comments

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing debug lines

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing another log line

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Updating spotless

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

---------

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
andrross pushed a commit that referenced this pull request Feb 2, 2023
…ons with OpenSearch (#6133)

* [Extensions] Add support for minimum compatible version for extensions with OpenSearch (#6003)

* Refactoring extensions config to have real useable values

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing werror

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing extensions feature flag from gradle run

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing description

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Adding MinimumCompatible Version for extensions

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Adding changelog

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Updating changelog

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Addressing comments

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Addressing comments

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing debug lines

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Removing another log line

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Updating spotless

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

---------

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Fixing tests in 2.x

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

---------

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@dblock
Copy link
Member

dblock commented Feb 7, 2023

Is this backwards? Why should the server care about the minimum version of a client? I think the extension should be required to provide a declaration for version compatibility and the server should check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Design/Discuss what goes into extensions.yml
6 participants