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

Remove JDK8 support #408

Merged
merged 3 commits into from
Mar 14, 2022
Merged

Remove JDK8 support #408

merged 3 commits into from
Mar 14, 2022

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Mar 9, 2022

Signed-off-by: Tyler Ohlsen ohltyler@amazon.com

Description

This PR does 3 things to remove JDK8 support:

  1. Bumps the source compatibility and target compatibility as specified in build.gradle from Java 8 -> Java 11. This tells the compiler to use a minimum of Java 11 when compiling Java source code (see gradle docs). This is needed for 2.0.0, since 2.0.0 is using Apache Lucene 9, which requires JDK 11 or newer (see release notes).
  2. Remove JDK8 in CI workflow
  3. Remove assumeFalse lines that were added in tests that were failing when running in JDK8 (see Build on JDK 8, revert private build of protostuff. #418)

Confirmed it builds and runs successfully, tests pass. Spun up a cluster and did a quick sanity test as well.

Issues Resolved

Resolves #398

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.

@ohltyler ohltyler added the v2.0.0 label Mar 9, 2022
@ohltyler ohltyler requested a review from a team March 9, 2022 21:43
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #408 (3b70634) into main (5dbec30) will decrease coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #408      +/-   ##
============================================
- Coverage     77.95%   77.71%   -0.25%     
+ Complexity     4127     4115      -12     
============================================
  Files           296      296              
  Lines         17676    17657      -19     
  Branches       1881     1879       -2     
============================================
- Hits          13780    13722      -58     
- Misses         2998     3033      +35     
- Partials        898      902       +4     
Flag Coverage Δ
plugin 77.71% <ø> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...port/SearchAnomalyDetectorInfoTransportAction.java 55.55% <0.00%> (-11.12%) ⬇️
...java/org/opensearch/ad/task/ADBatchTaskRunner.java 81.91% <0.00%> (-4.41%) ⬇️
...ava/org/opensearch/ad/task/ADHCBatchTaskCache.java 88.88% <0.00%> (-2.47%) ⬇️
...ain/java/org/opensearch/ad/task/ADTaskManager.java 76.90% <0.00%> (-0.84%) ⬇️
...va/org/opensearch/ad/AnomalyDetectorJobRunner.java 63.38% <0.00%> (-0.54%) ⬇️
...org/opensearch/ad/ratelimit/ResultWriteWorker.java 68.11% <0.00%> (-0.46%) ⬇️
.../main/java/org/opensearch/ad/NodeStateManager.java 71.24% <0.00%> (-0.38%) ⬇️
...in/java/org/opensearch/ad/EntityProfileRunner.java 74.71% <0.00%> (-0.29%) ⬇️
...rg/opensearch/ad/AnomalyDetectorProfileRunner.java 68.77% <0.00%> (-0.22%) ⬇️
src/main/java/org/opensearch/ad/model/Entity.java 85.04% <0.00%> (-0.14%) ⬇️
... and 7 more

@ohltyler ohltyler changed the title Bump source and target compatibility to Java 11 Remove JDK8 support Mar 11, 2022
@@ -79,7 +79,7 @@ allprojects {
}

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
Copy link
Collaborator

@ylwu-amzn ylwu-amzn Mar 11, 2022

Choose a reason for hiding this comment

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

From description

This is needed for 2.0.0, since 2.0.0 is using Apache Lucene 9, which requires JDK 11 or newer

Should we bump to 2.0 to test if this works? Check line 19, we are still using 1.3.0

Copy link
Member

Choose a reason for hiding this comment

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

^ Yes, definitely do. But you're fine doing it in another PR.

dblock
dblock previously approved these changes Mar 11, 2022
@@ -79,7 +79,7 @@ allprojects {
}

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
Copy link
Member

Choose a reason for hiding this comment

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

^ Yes, definitely do. But you're fine doing it in another PR.

ylwu-amzn
ylwu-amzn previously approved these changes Mar 11, 2022
@ohltyler
Copy link
Member Author

@ylwu-amzn we'll have changes included in 1.3.0 first, that are changing the same CI file as here. So let's hold off on merging this yet until #431 is ready and merged, and then I'll rebase here.

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler dismissed stale reviews from ylwu-amzn and dblock via 3b70634 March 11, 2022 21:58
@ohltyler
Copy link
Member Author

Rebased with latest changes in main.

Copy link
Member

@amitgalitz amitgalitz left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making all these changes!

@ohltyler ohltyler merged commit 8550816 into opensearch-project:main Mar 14, 2022
@ohltyler ohltyler deleted the upgrade-jdk branch March 14, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove support for JDK 8
5 participants