HDDS-14439. Require Java 17 for server components#9640
HDDS-14439. Require Java 17 for server components#9640adoroszlai wants to merge 2 commits intoapache:masterfrom
Conversation
|
Thanks for the patch! |
|
Thanks for working on this @adoroszlai. Can we fully switch to using Also should the default build behavior for the client be to inherit the version from the JDK being used, or should it default to 8 and require passing |
Created separate PR #9693.
That wouldn't work: to get client jars for JDK 8, we'd need to build with JDK 8, but server-side part requires JDK >= 17.
Now we have two sets of modules, "server" (explicitly have |
There was a problem hiding this comment.
@adoroszlai , thanks for working on this!
(Revised) Since we want to move to JDK 17, how about we use JDK 17 as the default and set maven.compiler.release in the client modules? Then, the future new modules will get JDK 17 by default.
| strategy: | ||
| matrix: | ||
| java: [ 8, 11, 17 ] | ||
| java: [ 17 ] |
There was a problem hiding this comment.
If we remove the JDK 8 and 11 cases, someone could break JDK 8 compatibility without be notice (e.g. using JDK 9 syntax in the code or adding a new client module requiring JDK 17). Is it possible to run test using JDK 17 to start the servers and JDK 8 to run the clients?
Or we should add a new test matrix to use JDK 8 compiling all the client modules and run some tests not requiring the servers (e.g. print out the version).
What changes were proposed in this pull request?
findbugscheck (temporarily) because Spotbugs 3 does not work with Java 17, and Spotbugs 4 reports 2K+ new warnings. Project to fix Spotbugs violations: HDDS-10150.Discussion: https://lists.apache.org/thread/k9kvobrg7ybthjfs78rfscpc2lty5x5y
https://issues.apache.org/jira/browse/HDDS-14439
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/21066105001