Skip to content

Remove direct usage of sun.misc.Signal#7144

Closed
pan3793 wants to merge 6 commits intoapache:masterfrom
pan3793:signal
Closed

Remove direct usage of sun.misc.Signal#7144
pan3793 wants to merge 6 commits intoapache:masterfrom
pan3793:signal

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Jul 21, 2025

Why are the changes needed?

This PR replaces the sun.misc.Signal with the Kyuubi wrapped one, see apache/kyuubi-shaded#64, which allows Kyuubi to use any of Java 8+ to compile with -release:8 while still ensuring compatibility with Java 8.

How was this patch tested?

Pass GHA.

Local tested by building against JDK 21, running on JDK 8, everything works as expected.

Was this patch authored or co-authored using generative AI tooling?

No.

@pan3793 pan3793 changed the title Signal Remove direct usage of sun.misc.Signal Jul 21, 2025
@pan3793
Copy link
Member Author

pan3793 commented Jul 21, 2025

cc @bowenliang123 @LuciferYang

Copy link
Contributor

@bowenliang123 bowenliang123 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (97f0bae) to head (6480406).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
.../scala/org/apache/kyuubi/util/SignalRegister.scala 0.00% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #7144   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         701     701           
  Lines       43501   43508    +7     
  Branches     5895    5897    +2     
======================================
- Misses      43501   43508    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pan3793 pan3793 self-assigned this Jul 24, 2025
@pan3793 pan3793 added this to the v1.11.0 milestone Jul 24, 2025
@pan3793 pan3793 closed this in d2cfc87 Jul 28, 2025
@pan3793
Copy link
Member Author

pan3793 commented Jul 28, 2025

Thanks, merged to master

@pan3793 pan3793 deleted the signal branch July 30, 2025 13:00
pan3793 added a commit that referenced this pull request Dec 26, 2025
### Why are the changes needed?

I hit an issue while preparing 1.11.0 RC0, which indicates I need to use a higher version of JDK for releasing.

```
[INFO] --- antlr4:4.13.1:antlr4 (default)  kyuubi-extension-spark-4-0_2.13 ---
[WARNING] Error injecting: org.antlr.mojo.antlr4.Antlr4Mojo
java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142)
```

In #7144, we made it always use `-release:8` for `jdk9+`, so we still produce Java 8 compatible bytecode even using JDK 17, for all modules except Spark 4.0/4.1 extension modules.

### How was this patch tested?

Will verify this in the next RC of 1.11.0

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #7289 from pan3793/release-java17.

Closes #7289

17e29be [Cheng Pan] Release requires Java 17 or 21

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
pan3793 added a commit that referenced this pull request Dec 26, 2025
### Why are the changes needed?

I hit an issue while preparing 1.11.0 RC0, which indicates I need to use a higher version of JDK for releasing.

```
[INFO] --- antlr4:4.13.1:antlr4 (default)  kyuubi-extension-spark-4-0_2.13 ---
[WARNING] Error injecting: org.antlr.mojo.antlr4.Antlr4Mojo
java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142)
```

In #7144, we made it always use `-release:8` for `jdk9+`, so we still produce Java 8 compatible bytecode even using JDK 17, for all modules except Spark 4.0/4.1 extension modules.

### How was this patch tested?

Will verify this in the next RC of 1.11.0

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #7289 from pan3793/release-java17.

Closes #7289

17e29be [Cheng Pan] Release requires Java 17 or 21

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit eecdaaa)
Signed-off-by: Cheng Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants