Skip to content

Add support for java 21 for debian packages - #14418

Open
vishesh92 wants to merge 1 commit into
apache:4.22from
shapeblue:debian-13-java-21-support
Open

vishesh92 wants to merge 1 commit into
apache:4.22from
shapeblue:debian-13-java-21-support

Conversation

@vishesh92

Copy link
Copy Markdown
Member

Description

This PR adds support for java 21 in the debian packages for debian 13 & ubuntu 26.04

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92
vishesh92 marked this pull request as ready for review October 16, 2026 08:07
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@weizhouapache

Copy link
Copy Markdown
Member

Points to consider:

  • Build JDK: the Build-Depends order puts openjdk-17-jdk ahead of openjdk-21-jdk. On a host with both installed, the build picks whichever apt resolves first. That’s probably fine, but it’s worth confirming which JDK the Debian 13 and Ubuntu 26.04 build actually uses.
  • Remaining mysql.connector users: tools/marvin/marvin/dbConnection.py and some tools/docker files still use mysql.connector directly. They are test tooling, so this is probably out of scope, but they’ll have the same problem on these distros.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.03%. Comparing base (c7667d8) to head (0fada8d).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14418   +/-   ##
=========================================
  Coverage     18.03%   18.03%           
- Complexity    16286    16289    +3     
=========================================
  Files          5937     5937           
  Lines        536771   536771           
  Branches      65782    65782           
=========================================
+ Hits          96787    96797   +10     
+ Misses       428932   428921   -11     
- Partials      11052    11053    +1     
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests 19.10% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✖️ suse15. SL-JID 19578

@vishesh92

vishesh92 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Points to consider:

* Build JDK: the Build-Depends order puts openjdk-17-jdk ahead of openjdk-21-jdk. On a host with both installed, the build picks whichever apt resolves first. That’s probably fine, but it’s worth confirming which JDK the Debian 13 and Ubuntu 26.04 build actually uses.

On distros that ship both (e.g. Ubuntu 24.04), a fresh install still pulls OpenJDK 17 since it's the first alternative, so existing setups see no change. OpenJDK 21 is only used when it's the only one available (Debian 13) or already installed.

* Remaining mysql.connector users: tools/marvin/marvin/dbConnection.py and some tools/docker files still use mysql.connector directly. They are test tooling, so this is probably out of scope, but they’ll have the same problem on these distros.

I don't think we need to make any changes for this in the PR.

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✖️ suse15. SL-JID 19583

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

ubuntu26 and debian13 environments have been created successfully without extra step to install python3 connector

Image

@wido wido left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this manually and then used Claude Fable to check and build the PR.

Built the PR head on Temurin JDK 21.0.12 with -P developer,systemvm -Dsimulator -DskipTests. All modules build, including the UI, apidocs and marvin. Unit tests of utils, framework/db, engine/orchestration and the KVM plugin also pass on JDK 21 (the one QemuImgTest error is a missing libvirt.so on my machine).

Package side: Debian 13 ships neither openjdk-17 nor python3-mysql.connector, so there Java 21 and PyMySQL are the only options. Ubuntu 26.04 still has openjdk-17 and python3-mysql.connector 9.5.0, so a fresh install there keeps running on 17.

The PyMySQL fallback is API compatible with how the three scripts use the connection: single statements, explicit commit, ping and fetchall.

One point, following up on Wei's remark about the build JDK. debian/rules does not set JAVA_HOME, so the build runs on whatever update-alternatives selects, not on the first Build-Depends alternative. On Ubuntu 26.04 default-jre-headless is openjdk-25 and maven lists it as its first alternative. If openjdk-25 ends up on the build host, the build fails in cloud-utils on aspectjweaver 1.8.13 (zip64 header rejected by JDK 24+). I hit this on my own 26.04 machine. It would be safer if build-deb.sh or debian/rules exported JAVA_HOME to the newest of java-21 or java-17 under /usr/lib/jvm when present. Fine as a follow-up.

Nit: the description only mentions Java 21, but half of the PR is the PyMySQL fallback. Worth a line in the description and ticking a box in the template.

@wido wido left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CLGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants