Skip to content

Ship each build image's default JDK, with javac - #2262

Open
tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:build-images-default-jdk
Open

tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:build-images-default-jdk

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Nov 6, 2026

Copy link
Copy Markdown
Member

The cbdb-build images are where Apache Cloudberry PXF gets compiled, and PXF's server build needs a full JDK. Not every image had one:

  • ubuntu22.04 had only the Java 11 JRE that ca-certificates-java pulls in, so no javac.
  • ubuntu24.04 and ubuntu26.04 had no Java at all.
  • rocky9 had JDK 11, while Rocky 9's default JDK is 17.

Install each distribution's default OpenJDK as a full JDK:

  rocky8       java-11-openjdk-devel    (unchanged)
  rocky9       java-17-openjdk-devel    (replaces JDK 11)
  rocky10      java-21-openjdk-devel    (unchanged)
  ubuntu22.04  openjdk-11-jdk-headless
  ubuntu24.04  openjdk-21-jdk-headless
  ubuntu26.04  openjdk-25-jdk-headless  (what default-jdk-headless
                                         resolves to there)

Ubuntu gets the headless JDK; nothing in these images needs the GUI libraries.

On rocky9, java and javac now resolve to 17 instead of 11, and /usr/lib/jvm/java-11-openjdk is gone. Nothing in this repository uses the image's JDK 11, PXF main builds with 17, and PXF 2.2 builds and passes its server unit tests on 17.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


The cbdb-build images are where Apache Cloudberry PXF gets compiled, and
PXF's server build needs a full JDK. Not every image had one:

- ubuntu22.04 had only the Java 11 JRE that ca-certificates-java pulls
  in, so no javac.
- ubuntu24.04 and ubuntu26.04 had no Java at all.
- rocky9 had JDK 11, while Rocky 9's default JDK is 17.

Install each distribution's default OpenJDK as a full JDK:

  rocky8       java-11-openjdk-devel    (unchanged)
  rocky9       java-17-openjdk-devel    (replaces JDK 11)
  rocky10      java-21-openjdk-devel    (unchanged)
  ubuntu22.04  openjdk-11-jdk-headless
  ubuntu24.04  openjdk-21-jdk-headless
  ubuntu26.04  openjdk-25-jdk-headless  (what default-jdk-headless
                                         resolves to there)

Ubuntu gets the headless JDK; nothing in these images needs the GUI
libraries.

On rocky9, java and javac now resolve to 17 instead of 11, and
/usr/lib/jvm/java-11-openjdk is gone. Nothing in this repository uses
the image's JDK 11, PXF main builds with 17, and PXF 2.2 builds and
passes its server unit tests on 17.
libcgroup1 \
meson \
ninja-build \
openjdk-11-jdk-headless \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we want 11?

Suggested change
openjdk-11-jdk-headless \
openjdk-17-jdk-headless \

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For the PXF 2.x version, we support the openjdk-11/17/18. I want to use the default JDK version for each operating system. OpenJDK-11 is the default one in Ubuntu 22.04 software source.

For PXF 3.x (main), we ask the 17 at least. We have a set up on this. It will not affect the PXF CI.

@leborchuk leborchuk 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.

LGTM, we need it to build pxf binaries

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.

3 participants