Skip to content

Conversation

@ryanbogan
Copy link
Member

@ryanbogan ryanbogan commented Apr 18, 2023

Description

In order to run integration testing for the SDK and future extensions, the OpenSearch gradle plugin needs to be able to run both extensions and plugins at the same time. This PR adds the capability to run extensions from the gradle plugin, while leaving all existing plugin functionality untouched.

Issues Resolved

opensearch-project/opensearch-sdk-java#589

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@ryanbogan
Copy link
Member Author

This doesn't only affect extensions, so should I add a changelog entry?

@ryanbogan ryanbogan requested a review from xuezhou25 as a code owner April 19, 2023 20:59
@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:

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

LGTM!

Looking at this code, I am wondering whether we should extract the connectivity parts of an extension into an interface? I suspect that for in-proc we will not want host/port as a communication channel. WDYT?

@saratvemulapalli
Copy link
Member

@owaiskazi19 Ryan addressed the comments, could you take a look again?

@saratvemulapalli
Copy link
Member

LGTM!

Looking at this code, I am wondering whether we should extract the connectivity parts of an extension into an interface? I suspect that for in-proc we will not want host/port as a communication channel. WDYT?

Makes sense. Definitely they have to be APIs. And abstract out inner structures. We started with something very simple, its about time to build these changes.

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2023

Gradle Check (Jenkins) Run Completed with:

@owaiskazi19 owaiskazi19 merged commit 84d66e0 into opensearch-project:main May 3, 2023
@ryanbogan ryanbogan added the backport 2.x Backport to 2.x branch label May 4, 2023
@ryanbogan ryanbogan deleted the add_extensions_to_gradle_plugin branch May 4, 2023 17:07
@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-7235-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 84d66e091a3dc4c52f72f64b3bbd2d45580feb48
# Push it to GitHub
git push --set-upstream origin backport/backport-7235-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-7235-to-2.x.

shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
* Add extension functionality to OpenSearch gradle plugin

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

* Modify gradle plugin to run both extensions and plugins

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

* Fix spotless

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

* Change feature flag initialization

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

* Address PR comments

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

* Change error method and remove unnecessary feature flag setting

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

---------

Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
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 skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants