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

Replaced implementation() by api() for opensearch libs #745

Merged
merged 3 commits into from
May 9, 2023

Conversation

nassipkali
Copy link
Contributor

@nassipkali nassipkali commented May 9, 2023

Description

Replaced implementation() by api() for opensearch libs

Issues Resolved

Fixes #609

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.

@codecov-commenter
Copy link

Codecov Report

Merging #745 (325e441) into main (026358e) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff            @@
##               main     #745   +/-   ##
=========================================
  Coverage     43.41%   43.41%           
  Complexity      313      313           
=========================================
  Files            69       69           
  Lines          1983     1983           
  Branches        138      138           
=========================================
  Hits            861      861           
  Misses         1106     1106           
  Partials         16       16           

@nassipkali
Copy link
Contributor Author

@dbwiddis I tested it on CRUDExtension and it removed requirement of defining opensearch, clients in dependencies manually. But still needs add to dependencies a lot of apache-lucene libraries

@nassipkali
Copy link
Contributor Author

@dbwiddis Like this:

<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-core</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-analysis-common</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-backward-codecs</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-grouping</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-highlighter</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-join</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-memory</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-misc</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-queries</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-queryparser</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-sandbox</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-spatial-extras</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-spatial3d</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>
<dependency>
	<groupId>org.apache.lucene</groupId>
	<artifactId>lucene-suggest</artifactId>
	<version>9.6.0-SNAPSHOT</version>
</dependency>

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.

See below.

build.gradle Outdated Show resolved Hide resolved
build.gradle Show resolved Hide resolved
Signed-off-by: Daulet Nassipkali <[email protected]>
@nassipkali nassipkali requested a review from dbwiddis May 9, 2023 18:29
@dbwiddis
Copy link
Member

dbwiddis commented May 9, 2023

@dbwiddis I tested it on CRUDExtension and it removed requirement of defining opensearch, clients in dependencies manually. But still needs add to dependencies a lot of apache-lucene libraries

Those libraries should come in via OpenSearch core, though, not the RestHighLevelClient... I think?

@nassipkali
Copy link
Contributor Author

@dbwiddis What does Validate Gradle Wrapper check? After last commit that check failed

@dbwiddis
Copy link
Member

dbwiddis commented May 9, 2023

@dbwiddis What does Validate Gradle Wrapper check? After last commit that check failed

It just checks the sha of the wrapper jar vs. valid sha list so people don't put in a sneaky bad jar file.... in this case the failure is just a transient github action connection issue. GitHub has had some issues the last 24 hours...

@dbwiddis
Copy link
Member

dbwiddis commented May 9, 2023

The other (javadoc compilation) failure was caused by an OpenSearch PR merge that's a companion of #743 which should be merged shortly. Watch for that to be merged and then rebase with main.

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!

@dbwiddis dbwiddis added the CCI Part of the College Contributor Initiative label May 9, 2023
@dbwiddis dbwiddis requested a review from owaiskazi19 May 9, 2023 19:49
@owaiskazi19 owaiskazi19 merged commit 674c627 into opensearch-project:main May 9, 2023
@opensearch-trigger-bot
Copy link

The backport to 1.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-1.x 1.x
# Navigate to the new working tree
pushd ../.worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-745-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 674c627ef8338ed23bef31f5537ee9886a3b8ca8
# Push it to GitHub
git push --set-upstream origin backport/backport-745-to-1.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.x

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

dbwiddis pushed a commit to dbwiddis/opensearch-sdk-java that referenced this pull request May 9, 2023
…oject#745)

* replaced implementation() by api() for opensearch libs

Signed-off-by: Daulet Nassipkali <[email protected]>

* returned one to implementation()

Signed-off-by: Daulet Nassipkali <[email protected]>

---------

Signed-off-by: Daulet Nassipkali <[email protected]>
dbwiddis pushed a commit to dbwiddis/opensearch-sdk-java that referenced this pull request May 9, 2023
…oject#745)

* replaced implementation() by api() for opensearch libs

Signed-off-by: Daulet Nassipkali <[email protected]>

* returned one to implementation()

Signed-off-by: Daulet Nassipkali <[email protected]>

---------

Signed-off-by: Daulet Nassipkali <[email protected]>
dbwiddis added a commit that referenced this pull request May 10, 2023
* replaced implementation() by api() for opensearch libs



* returned one to implementation()



---------

Signed-off-by: Daulet Nassipkali <[email protected]>
Co-authored-by: Daulet Nassipkali <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x CCI Part of the College Contributor Initiative valued-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Transitive Dependencies are not exposed to dependent projects
4 participants