-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Restore support for Java 8 for RestClient #11562
Conversation
❌ Gradle check result for b8f482e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 4c449c8: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Compatibility status:Checks if related components are compatible with change 40b36ca Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
❌ Gradle check result for 2170644: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Andriy Redko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! Is this enough to ensure that we don't break it in the future?
❕ Gradle check result for 40b36ca: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
👏 |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-11562-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4e727416c5fa231d5401bed9b3a4e28d912b0cb0
# Push it to GitHub
git push --set-upstream origin backport/backport-11562-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit 4e72741)
Signed-off-by: Andriy Redko <[email protected]>
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit 4e72741)
Hello Thanks !! |
It is added to OpenSearch Rest Client (not "Java high-level REST client" ), for the OpenSearch "Java Client" - the change in under review opensearch-project/opensearch-java#767 |
Hello https://opensearch.org/docs/latest/clients/ Sorry but just to avoid confusion, "OpenSearch Rest Client" and "OpenSearch Java High-Level REST Client" both are same ? Java 8 support is restored in all which clients ? Thanks !! |
Hello @praveenchandna, this is the Rest Client from the OpenSearch core [1], which is one of the transports used by OpenSearch Java Client [2]. Thank you. [1] https://github.com/opensearch-project/OpenSearch/tree/main/client/rest |
Hi @reta , please some help since I see your name all over the place so you must probably know; with the newly released opensearch-java 2.9.0 I was under the impression that I would be able to use the client in a Java 8 project. When I include the newly deployed artifact https://central.sonatype.com/artifact/org.opensearch.client/opensearch-java and try to instantiate either the Rest Client transport or the AwsSdk2Transport per docs https://opensearch.org/docs/latest/clients/java/#installing-the-client-using-restclient-transport , my project compiles fine against Java 8 but when I run the app with Java8 I get this: |
Hi @Hrvojeee , no you should not be missing the point here - your JDK-8 project should be working fine with
|
Ok this is embarrassing @reta, did not try javap to confirm. I must have had some older version of the opensearch-java lib on my classpath. When i did some mvn cleans its working fine. Sorry, stupid question, and thanks for the response! |
Not a problem and thank you for trying it out |
Signed-off-by: Andriy Redko <[email protected]>
Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Restore support for Java 8 for RestClient. There are still community asks for 2.x clients compatible with Java 8 baseline. The issue has worsen recently due to breaking changes in 2.x baseline (#5902, #9082), runtime replacement 1.x vs 2.x is not transparent anymore (causes compile time issues).
Related Issues
Part of opensearch-project/opensearch-java#156
Check List
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.