Skip to content

Conversation

@finnroblin
Copy link
Contributor

Description

Upgrade Java version to 24 and gradle to 8.14 as per ask from infra team.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@finnroblin
Copy link
Contributor Author

Build failures are coming from the :remote-index-build-client:compileJava task.

...
Caused by: java.lang.NoSuchFieldException: com.sun.tools.javac.code.TypeTag :: UNKNOWN
        at lombok.permit.Permit.getField(Permit.java:144)
        at lombok.javac.JavacTreeMaker$SchroedingerType.getFieldCached(JavacTreeMaker.java:171)
        at lombok.javac.JavacTreeMaker$TypeTag.typeTag(JavacTreeMaker.java:259)
        at lombok.javac.Javac.<clinit>(Javac.java:186)

I am investigating if bumping the lombok version will fix this.

@finnroblin
Copy link
Contributor Author

Build is working locally, rerunning CI with lombok upgrade.

@finnroblin
Copy link
Contributor Author

Ah. seems that we need accessUnixDomainSocket permission for windows, thanks to @expani for the help! (ref here)

@finnroblin
Copy link
Contributor Author

Hi @reta, the k-NN plugin windows CI is failing after JDK 24 bump likely due to security manager deprecation. The cause appears to be an AccessController.doPrivileged action that makes a HTTP request to the remote vector build service.

I added permission java.net.NetPermission "accessUnixDomainSocket" based on your PR in transport plugins. However, that does not fix the CI run. Do you have any suggestions of other security/java agent changes required to onboard to JDK 24? Thanks

@reta
Copy link
Contributor

reta commented Jul 15, 2025

Do you have any suggestions of other security/java agent changes required to onboard to JDK 24? Thanks

Hi @finnroblin , sure, I will take a look shortly, couldn't point to the exact problem yet since we have seen a few. Thank you

@cwperks
Copy link
Member

cwperks commented Jul 15, 2025

@reta I'm about to raise a PR in core. A few min.

@cwperks
Copy link
Member

cwperks commented Jul 15, 2025

@reta Not sure how to test, but I believe the changes in opensearch-project/OpenSearch#18752 would resolve the issue.

Signed-off-by: Finn Roblin <[email protected]>
@finnroblin
Copy link
Contributor Author

Windows CI passing after this change merged into core. Thanks @cwperks @reta!

Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

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

LGTM!

permission java.lang.RuntimePermission "loadLibrary.opensearchknn_faiss_avx512";
permission java.lang.RuntimePermission "loadLibrary.opensearchknn_faiss_avx512_spr";
permission java.net.SocketPermission "*", "connect,resolve";
permission java.net.NetPermission "accessUnixDomainSocket";
Copy link
Member

Choose a reason for hiding this comment

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

Why are we adding this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need this permission for remote index build client on windows. Otherwise it will fail due to the OS security manager. OS core needed to add it to their transport plugins which use similar mechanisms to remote index build client.

Copy link
Member

Choose a reason for hiding this comment

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

makes sense. Thanks!

@naveentatikonda naveentatikonda merged commit 6c9c621 into opensearch-project:main Jul 16, 2025
37 checks passed
leoyu808 pushed a commit to leoyu808/k-NN that referenced this pull request Jul 30, 2025
* Bump JDK to 24, gradle to 8.14

Signed-off-by: Finn Roblin <[email protected]>

* bump lombok to 8.14, add changelog entry

Signed-off-by: Finn Roblin <[email protected]>

* bump jacoco version

Signed-off-by: Finn Roblin <[email protected]>

* remove java 24 from bwc to avoid getTotalPhysicalMemorySize/getTotalMemorySize deprecation issue

Signed-off-by: Finn Roblin <[email protected]>

* switch from deprecate java SM to opensearch SM in RemoteIndexHTTPClient

Signed-off-by: Finn Roblin <[email protected]>

* add accessUnixDomainSocket to fix windows CI

Signed-off-by: Finn Roblin <[email protected]>

* changelog change to rerun CI

Signed-off-by: Finn Roblin <[email protected]>

---------

Signed-off-by: Finn Roblin <[email protected]>
Signed-off-by: Leo Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants