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

Update gradle to 8.13 to fix command exec on java 21 #2571

Merged
merged 4 commits into from
Mar 3, 2025

Conversation

jmazanec15
Copy link
Member

Description

Updates gradle version to fix command execution for java 21. With that, it simplifies overall gradle script and not having to locate dependencies. The environment is inherited from the path.

When setting up the project with jdk 21, the "cmake" command is not being found in the path. This is a bug in gradle and has been fixed. With this, we can remove some of the additional code.

Related Issues

Check List

  • 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.

@jmazanec15 jmazanec15 added the Maintenance Add support for new versions of OpenSearch/Dashboards from upstream label Mar 3, 2025
Updates gradle version to fix command execution for java 21. With that,
it simplifies overall gradle script and not having to locate
dependencies. The environment is inherited from the path.

Signed-off-by: John Mazanec <jmazane@amazon.com>
build.gradle Outdated
Comment on lines 414 to 427
task buildNmslib(type:Exec) {
dependsOn cmakeJniLib
def cmakePath = findExecutable("cmake")
logger.lifecycle("Using cmake at: ${cmakePath}")

if (cmakePath.isEmpty()) {
throw new GradleException("CMake not found in PATH. Please install CMake.")
}

commandLine cmakePath,
'--build', 'jni/build',
'--target', 'opensearchknn_nmslib',
'--parallel', "${nproc_count}"
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jmazanec15 any reason for removing this? I remember @peterzhuamazon added this to ensure that release builds are not failing. Would like to know why we are removing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I see. Let me fix. I just thought it was duplicate code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

np. :)

Copy link
Member

Choose a reason for hiding this comment

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

Yes we add this specifically to build nmslib with different gccs compares to faiss lib.

cc: @naveentatikonda

Thanks.

@@ -1,12 +1,7 @@
#
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit : why was this removed

Copy link
Member Author

Choose a reason for hiding this comment

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

no reason - let me put back

Signed-off-by: John Mazanec <jmazane@amazon.com>
navneet1v
navneet1v previously approved these changes Mar 3, 2025
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com>
@jmazanec15 jmazanec15 requested review from navneet1v and shatejas March 3, 2025 22:14
@jmazanec15 jmazanec15 merged commit 07fe680 into opensearch-project:main Mar 3, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Add support for new versions of OpenSearch/Dashboards from upstream v3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants