-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Switch the build to JDK 11 #1369
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
Conversation
3f70792
to
57fc110
Compare
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.
Great job Piotr! I definitely support this change!
I am still not happy with all the use-Java-8-to-do-X infection all over the place. If we can move JMX et al. to its own repository in a follow-up story, can we remove the 8 dependency all together and only employ it only in CI while testing?
@vy, I updated the PR so that you can run the build with whatever JDK newer or equal to 11, as long as:
The first condition will drop when we get rid of |
@ppkarwasz, thanks so much for the quick response! I have some questions/remarks: ToolchainsIt feels odd to me to require both toolchains (which is the Maven-native way of providing multiple JDKs) and an environment variable for JDK 8. I understand that you intend to move
I am in favor of the 2nd approach here. But maybe I am missing something obvious.
|
The need for toolchains comes from a couple of JDK 8-specific tests in If you run those tests on JDK 11, they might succeed, but they will not be testing the code they are supposed to test. I don't see a problem in running the build with JDK 11 (unless it is for a release): if there are differences in building experience between JDK 11 and JDK 17, we should know about it. |
dd4874a
to
b7189ae
Compare
@vy, I refactored this PR by replacing the dependency on
For simplicity I also replaced the |
In the end JDK 17 was too ambitious: many tests still fail there. In its final form this PR:
|
Co-authored-by: Volkan Yazıcı <[email protected]>
The whitespace used to print numbers changed between JDK 11 and JDK 17.
### What changes were proposed in this pull request? This pr aims upgrade log4j from 2.20.0 to 2.21.0. ### Why are the changes needed? Support for the zstd compression algorithm has been added in the new version: apache/logging-log4j2#1508 | apache/logging-log4j2#1514 Meanwhile, the new version starts to use Java 11 for building, and the runtime version is still compatible with Java 8: apache/logging-log4j2#1369 The new version also brings some bug fixes, such as: - Fixed logging of java.sql.Date objects by appending it before Log4J tries to call java.util.Date.toInstant() on it: apache/logging-log4j2#1366 - Fixed concurrent date-time formatting issue in PatternLayout: apache/logging-log4j2#1485 - Fixed buffer size in Log4jFixedFormatter date time formatter: apache/logging-log4j2#1418 - Fixed the propagation of synchronous action failures in RollingFileManager and FileRenameAction: apache/logging-log4j2#1445 | apache/logging-log4j2#1549 - Fixed RollingFileManager to propagate failed synchronous actions correctly: apache/logging-log4j2#1445 and more. The complete release note is as follows: - https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.21.0 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #43478 from LuciferYang/SPARK-45625. Authored-by: yangjie01 <[email protected]> Signed-off-by: yangjie01 <[email protected]>
This switches the build to use JDK 17 with
--release 8
(or whatever is appropriate for the module).JDK 8 is still required for:
java8-tests
profile,providing.jconsole.jar
forlog4j-jmx-gui
To compilelog4j-jmx-gui
running JDK 17 aJAVA_HOME_8_X64
environment variable must be provided and contain the location of the JDK 8 installation.