This is an automated email from the ASF dual-hosted git repository.
uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new b7f03406b06 Move JDK installation to image-build time (#68485)
b7f03406b06 is described below
commit b7f03406b0637787cb536cfcec0fab6818e25a66
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Sat Jun 13 13:56:56 2026 +0800
Move JDK installation to image-build time (#68485)
---
.pre-commit-config.yaml | 4 +-
Dockerfile | 20 +++++++
Dockerfile.ci | 25 +++++++--
dev/breeze/doc/images/output_build-docs.svg | 2 +-
dev/breeze/doc/images/output_build-docs.txt | 2 +-
dev/breeze/doc/images/output_shell.svg | 16 ++----
dev/breeze/doc/images/output_shell.txt | 2 +-
dev/breeze/doc/images/output_start-airflow.svg | 16 ++----
dev/breeze/doc/images/output_start-airflow.txt | 2 +-
.../src/airflow_breeze/commands/common_options.py | 2 +-
.../airflow_breeze/commands/developer_commands.py | 6 --
.../commands/developer_commands_config.py | 2 -
.../src/airflow_breeze/params/shell_params.py | 3 -
scripts/ci/prek/check_java_sdk_version_in_sync.py | 30 ++++++++--
scripts/docker/entrypoint_ci.sh | 4 --
scripts/docker/install_jdk.sh | 65 ----------------------
scripts/docker/install_os_dependencies.sh | 20 +++++++
17 files changed, 106 insertions(+), 115 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 171cacf1459..7d268d7d558 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -264,7 +264,9 @@ repos:
^\.github/workflows/ci-(arm|amd)\.yml$|
^\.github/workflows/codeql-analysis\.yml$|
^java-sdk/buildSrc/src/main/kotlin/airflow-jvm-conventions\.gradle\.kts$|
- ^scripts/docker/install_jdk\.sh$
+ ^scripts/docker/install_os_dependencies\.sh$|
+ ^Dockerfile$|
+ ^Dockerfile\.ci$
pass_filenames: false
require_serial: true
- id: check-partition-mapper-defaults-in-sync
diff --git a/Dockerfile b/Dockerfile
index d31fa228b9a..7ea413a1ddb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -122,6 +122,7 @@ fi
AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION:-3.10.18}
PYTHON_LTO=${PYTHON_LTO:-true}
GOLANG_MAJOR_MINOR_VERSION=${GOLANG_MAJOR_MINOR_VERSION:-1.24.4}
+TEMURIN_VERSION=${TEMURIN_VERSION:-11}
RUSTUP_DEFAULT_TOOLCHAIN=${RUSTUP_DEFAULT_TOOLCHAIN:-stable}
RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
COSIGN_VERSION=${COSIGN_VERSION:-3.0.5}
@@ -495,6 +496,24 @@ function install_golang() {
rm -rf /usr/local/go && tar -C /usr/local -xzf
go"${GOLANG_MAJOR_MINOR_VERSION}".linux.tar.gz
}
+function install_jdk() {
+ # Install Eclipse Temurin JDK from the Adoptium apt repository
(https://adoptium.net/installation/linux/).
+ apt-get update -qq
+ apt-get install -y --no-install-recommends wget gnupg apt-transport-https
ca-certificates
+ mkdir -p /etc/apt/keyrings
+ wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public \
+ | tee /etc/apt/keyrings/adoptium.asc > /dev/null
+ # shellcheck disable=SC1091
+ DISTRO_CODENAME=$(. /etc/os-release; echo "${VERSION_CODENAME}")
+ echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] \
+https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \
+ | tee /etc/apt/sources.list.d/adoptium.list > /dev/null
+ apt-get update -qq
+ apt-get install -y --no-install-recommends "temurin-${TEMURIN_VERSION}-jdk"
+ apt-get clean
+ rm -rf /var/lib/apt/lists/*
+}
+
function install_rustup() {
local arch
arch="$(dpkg --print-architecture)"
@@ -540,6 +559,7 @@ else
install_rustup
if [[ "${INSTALLATION_TYPE}" == "CI" ]]; then
install_golang
+ install_jdk
fi
install_docker_cli
apt_clean
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 7bf8fc505b6..947d8efb0cb 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -62,6 +62,7 @@ fi
AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION:-3.10.18}
PYTHON_LTO=${PYTHON_LTO:-true}
GOLANG_MAJOR_MINOR_VERSION=${GOLANG_MAJOR_MINOR_VERSION:-1.24.4}
+TEMURIN_VERSION=${TEMURIN_VERSION:-11}
RUSTUP_DEFAULT_TOOLCHAIN=${RUSTUP_DEFAULT_TOOLCHAIN:-stable}
RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
COSIGN_VERSION=${COSIGN_VERSION:-3.0.5}
@@ -435,6 +436,24 @@ function install_golang() {
rm -rf /usr/local/go && tar -C /usr/local -xzf
go"${GOLANG_MAJOR_MINOR_VERSION}".linux.tar.gz
}
+function install_jdk() {
+ # Install Eclipse Temurin JDK from the Adoptium apt repository
(https://adoptium.net/installation/linux/).
+ apt-get update -qq
+ apt-get install -y --no-install-recommends wget gnupg apt-transport-https
ca-certificates
+ mkdir -p /etc/apt/keyrings
+ wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public \
+ | tee /etc/apt/keyrings/adoptium.asc > /dev/null
+ # shellcheck disable=SC1091
+ DISTRO_CODENAME=$(. /etc/os-release; echo "${VERSION_CODENAME}")
+ echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] \
+https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \
+ | tee /etc/apt/sources.list.d/adoptium.list > /dev/null
+ apt-get update -qq
+ apt-get install -y --no-install-recommends "temurin-${TEMURIN_VERSION}-jdk"
+ apt-get clean
+ rm -rf /var/lib/apt/lists/*
+}
+
function install_rustup() {
local arch
arch="$(dpkg --print-architecture)"
@@ -480,6 +499,7 @@ else
install_rustup
if [[ "${INSTALLATION_TYPE}" == "CI" ]]; then
install_golang
+ install_jdk
fi
install_docker_cli
apt_clean
@@ -1222,10 +1242,6 @@ function environment_initialization() {
export AIRFLOW__SCHEDULER__GO_WORKER=True
fi
- if [[ ${INSTALL_SDK_JAVA=} == "true" ]]; then
- "${AIRFLOW_SOURCES}/scripts/docker/install_jdk.sh"
- fi
-
RUN_TESTS=${RUN_TESTS:="false"}
CI=${CI:="false"}
@@ -1705,6 +1721,7 @@ ENV DEV_APT_COMMAND=${DEV_APT_COMMAND} \
ARG AIRFLOW_PYTHON_VERSION="3.13.14"
ENV AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION}
ENV GOLANG_MAJOR_MINOR_VERSION="1.26.4"
+ENV TEMURIN_VERSION="11"
ENV RUSTUP_HOME="/usr/local/rustup"
ENV CARGO_HOME="/usr/local/cargo"
ENV PATH="${CARGO_HOME}/bin:${PATH}"
diff --git a/dev/breeze/doc/images/output_build-docs.svg
b/dev/breeze/doc/images/output_build-docs.svg
index 8600627f062..172f0f6576e 100644
--- a/dev/breeze/doc/images/output_build-docs.svg
+++ b/dev/breeze/doc/images/output_build-docs.svg
@@ -275,7 +275,7 @@
</text><text class="breeze-build-docs-r5" x="0" y="874" textLength="12.2"
clip-path="url(#breeze-build-docs-line-35)">│</text><text
class="breeze-build-docs-r1" x="549" y="874" textLength="890.6"
clip-path="url(#breeze-build-docs-line-35)">the build.                                       
[...]
</text><text class="breeze-build-docs-r5" x="0" y="898.4" textLength="1464"
clip-path="url(#breeze-build-docs-line-36)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-build-docs-r1" x="1464" y="898.4" textLength="12.2"
clip-path="url(#breeze-build-docs-line-36)">
</text><text class="breeze-build-docs-r5" x="0" y="922.8" textLength="24.4"
clip-path="url(#breeze-build-docs-line-37)">╭─</text><text
class="breeze-build-docs-r5" x="24.4" y="922.8" textLength="231.8"
clip-path="url(#breeze-build-docs-line-37)"> Filtering options </text><text
class="breeze-build-docs-r5" x="256.2" y="922.8" textLength="1183.4"
clip-path="url(#breeze-build-docs-line-37)">──────────────────────────────────────────────────────────────────────────────────────
[...]
-</text><text class="breeze-build-docs-r5" x="0" y="947.2" textLength="12.2"
clip-path="url(#breeze-build-docs-line-38)">│</text><text
class="breeze-build-docs-r4" x="24.4" y="947.2" textLength="353.8"
clip-path="url(#breeze-build-docs-line-38)">--sdk                        </text><text
class="breeze-build-docs-r1" x="402.6" y="947.2" textLength="305"
clip-path="url(#bre [...]
+</text><text class="breeze-build-docs-r5" x="0" y="947.2" textLength="12.2"
clip-path="url(#breeze-build-docs-line-38)">│</text><text
class="breeze-build-docs-r4" x="24.4" y="947.2" textLength="353.8"
clip-path="url(#breeze-build-docs-line-38)">--sdk                        </text><text
class="breeze-build-docs-r1" x="402.6" y="947.2" textLength="305"
clip-path="url(#bre [...]
</text><text class="breeze-build-docs-r5" x="0" y="971.6" textLength="12.2"
clip-path="url(#breeze-build-docs-line-39)">│</text><text
class="breeze-build-docs-r4" x="24.4" y="971.6" textLength="353.8"
clip-path="url(#breeze-build-docs-line-39)">--package-filter             </text><text
class="breeze-build-docs-r1" x="402.6" y="971.6" textLength="1037"
clip-path="url(#breeze-build-docs-line-39)">Filter(s) to use [...]
</text><text class="breeze-build-docs-r5" x="0" y="996" textLength="12.2"
clip-path="url(#breeze-build-docs-line-40)">│</text><text
class="breeze-build-docs-r1" x="402.6" y="996" textLength="1037"
clip-path="url(#breeze-build-docs-line-40)">the full package name, for example `apache-airflow-providers-*`. Useful when you want</text><text
class="breeze-build-docs-r5" x="1451.8" y="996" textLength="12.2"
clip-path="url(#breeze-build-docs-lin [...]
</text><text class="breeze-build-docs-r5" x="0" y="1020.4" textLength="12.2"
clip-path="url(#breeze-build-docs-line-41)">│</text><text
class="breeze-build-docs-r1" x="402.6" y="1020.4" textLength="634.4"
clip-path="url(#breeze-build-docs-line-41)">to selectseveral similarly named packages together. </text><text
class="breeze-build-docs-r7" x="1037" y="1020.4" textLength="73.2"
clip-path="url(#breeze-build-docs-line-41)">(TEXT)</text><text
class="breeze-build [...]
diff --git a/dev/breeze/doc/images/output_build-docs.txt
b/dev/breeze/doc/images/output_build-docs.txt
index 087af2222c3..a734b81b0c7 100644
--- a/dev/breeze/doc/images/output_build-docs.txt
+++ b/dev/breeze/doc/images/output_build-docs.txt
@@ -1 +1 @@
-3cdfae5aadaebb0e62a841f8cf18783e
+de29604dc4d7031b9a26a1e0350d7806
diff --git a/dev/breeze/doc/images/output_shell.svg
b/dev/breeze/doc/images/output_shell.svg
index da26b3d8234..3d183fe886d 100644
--- a/dev/breeze/doc/images/output_shell.svg
+++ b/dev/breeze/doc/images/output_shell.svg
@@ -1,4 +1,4 @@
-<svg class="rich-terminal" viewBox="0 0 1482 4198.0"
xmlns="http://www.w3.org/2000/svg">
+<svg class="rich-terminal" viewBox="0 0 1482 4173.599999999999"
xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io -->
<style>
@@ -43,7 +43,7 @@
<defs>
<clipPath id="breeze-shell-clip-terminal">
- <rect x="0" y="0" width="1463.0" height="4147.0" />
+ <rect x="0" y="0" width="1463.0" height="4122.599999999999" />
</clipPath>
<clipPath id="breeze-shell-line-0">
<rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -549,12 +549,9 @@
<clipPath id="breeze-shell-line-167">
<rect x="0" y="4076.3" width="1464" height="24.65"/>
</clipPath>
-<clipPath id="breeze-shell-line-168">
- <rect x="0" y="4100.7" width="1464" height="24.65"/>
- </clipPath>
</defs>
- <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="4196" rx="8"/><text class="breeze-shell-title"
fill="#c5c8c6" text-anchor="middle" x="740" y="27">Command: shell</text>
+ <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="4171.6" rx="8"/><text
class="breeze-shell-title" fill="#c5c8c6" text-anchor="middle" x="740"
y="27">Command: shell</text>
<g transform="translate(26,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -730,10 +727,9 @@
</text><text class="breeze-shell-r5" x="0" y="3997.2" textLength="24.4"
clip-path="url(#breeze-shell-line-163)">╭─</text><text class="breeze-shell-r5"
x="24.4" y="3997.2" textLength="195.2"
clip-path="url(#breeze-shell-line-163)"> Common options </text><text
class="breeze-shell-r5" x="219.6" y="3997.2" textLength="1220"
clip-path="url(#breeze-shell-line-163)">────────────────────────────────────────────────────────────────────────────────────────────────────</text><text
cl [...]
</text><text class="breeze-shell-r5" x="0" y="4021.6" textLength="12.2"
clip-path="url(#breeze-shell-line-164)">│</text><text class="breeze-shell-r4"
x="24.4" y="4021.6" textLength="109.8"
clip-path="url(#breeze-shell-line-164)">--answer </text><text
class="breeze-shell-r6" x="158.6" y="4021.6" textLength="24.4"
clip-path="url(#breeze-shell-line-164)">-a</text><text class="breeze-shell-r1"
x="207.4" y="4021.6" textLength="329.4"
clip-path="url(#breeze-shell-line-164)">Force ans [...]
</text><text class="breeze-shell-r5" x="0" y="4046" textLength="12.2"
clip-path="url(#breeze-shell-line-165)">│</text><text class="breeze-shell-r4"
x="24.4" y="4046" textLength="109.8"
clip-path="url(#breeze-shell-line-165)">--dry-run</text><text
class="breeze-shell-r6" x="158.6" y="4046" textLength="24.4"
clip-path="url(#breeze-shell-line-165)">-D</text><text class="breeze-shell-r1"
x="207.4" y="4046" textLength="719.8"
clip-path="url(#breeze-shell-line-165)">If dry-run is [...]
-</text><text class="breeze-shell-r5" x="0" y="4070.4" textLength="12.2"
clip-path="url(#breeze-shell-line-166)">│</text><text class="breeze-shell-r4"
x="24.4" y="4070.4" textLength="109.8"
clip-path="url(#breeze-shell-line-166)">--sdk    </text><text
class="breeze-shell-r1" x="207.4" y="4070.4" textLength="305"
clip-path="url(#breeze-shell-line-166)">Install SDK toolchain(s) </text><text
class="breeze-shell-r7" x="512.4" y="4070.4" textLength="73.2" cli [...]
-</text><text class="breeze-shell-r5" x="0" y="4094.8" textLength="12.2"
clip-path="url(#breeze-shell-line-167)">│</text><text class="breeze-shell-r4"
x="24.4" y="4094.8" textLength="109.8"
clip-path="url(#breeze-shell-line-167)">--verbose</text><text
class="breeze-shell-r6" x="158.6" y="4094.8" textLength="24.4"
clip-path="url(#breeze-shell-line-167)">-v</text><text class="breeze-shell-r1"
x="207.4" y="4094.8" textLength="585.6"
clip-path="url(#breeze-shell-line-167)">Print verbose& [...]
-</text><text class="breeze-shell-r5" x="0" y="4119.2" textLength="12.2"
clip-path="url(#breeze-shell-line-168)">│</text><text class="breeze-shell-r4"
x="24.4" y="4119.2" textLength="109.8"
clip-path="url(#breeze-shell-line-168)">--help   </text><text
class="breeze-shell-r6" x="158.6" y="4119.2" textLength="24.4"
clip-path="url(#breeze-shell-line-168)">-h</text><text class="breeze-shell-r1"
x="207.4" y="4119.2" textLength="329.4"
clip-path="url(#breeze-shell-line-168)">Show [...]
-</text><text class="breeze-shell-r5" x="0" y="4143.6" textLength="1464"
clip-path="url(#breeze-shell-line-169)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-shell-r1" x="1464" y="4143.6" textLength="12.2"
clip-path="url(#breeze-shell-line-169)">
+</text><text class="breeze-shell-r5" x="0" y="4070.4" textLength="12.2"
clip-path="url(#breeze-shell-line-166)">│</text><text class="breeze-shell-r4"
x="24.4" y="4070.4" textLength="109.8"
clip-path="url(#breeze-shell-line-166)">--verbose</text><text
class="breeze-shell-r6" x="158.6" y="4070.4" textLength="24.4"
clip-path="url(#breeze-shell-line-166)">-v</text><text class="breeze-shell-r1"
x="207.4" y="4070.4" textLength="585.6"
clip-path="url(#breeze-shell-line-166)">Print verbose& [...]
+</text><text class="breeze-shell-r5" x="0" y="4094.8" textLength="12.2"
clip-path="url(#breeze-shell-line-167)">│</text><text class="breeze-shell-r4"
x="24.4" y="4094.8" textLength="109.8"
clip-path="url(#breeze-shell-line-167)">--help   </text><text
class="breeze-shell-r6" x="158.6" y="4094.8" textLength="24.4"
clip-path="url(#breeze-shell-line-167)">-h</text><text class="breeze-shell-r1"
x="207.4" y="4094.8" textLength="329.4"
clip-path="url(#breeze-shell-line-167)">Show [...]
+</text><text class="breeze-shell-r5" x="0" y="4119.2" textLength="1464"
clip-path="url(#breeze-shell-line-168)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-shell-r1" x="1464" y="4119.2" textLength="12.2"
clip-path="url(#breeze-shell-line-168)">
</text>
</g>
</g>
diff --git a/dev/breeze/doc/images/output_shell.txt
b/dev/breeze/doc/images/output_shell.txt
index 672adb52e5b..c6f0033fe49 100644
--- a/dev/breeze/doc/images/output_shell.txt
+++ b/dev/breeze/doc/images/output_shell.txt
@@ -1 +1 @@
-268e5e72a6e6f5aba13c0dd76e5ba398
+8870a64a6164fe50500283a4f1893b24
diff --git a/dev/breeze/doc/images/output_start-airflow.svg
b/dev/breeze/doc/images/output_start-airflow.svg
index b14cbe00c20..963644f1ea3 100644
--- a/dev/breeze/doc/images/output_start-airflow.svg
+++ b/dev/breeze/doc/images/output_start-airflow.svg
@@ -1,4 +1,4 @@
-<svg class="rich-terminal" viewBox="0 0 1482 3685.6"
xmlns="http://www.w3.org/2000/svg">
+<svg class="rich-terminal" viewBox="0 0 1482 3661.2"
xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io -->
<style>
@@ -43,7 +43,7 @@
<defs>
<clipPath id="breeze-start-airflow-clip-terminal">
- <rect x="0" y="0" width="1463.0" height="3634.6" />
+ <rect x="0" y="0" width="1463.0" height="3610.2" />
</clipPath>
<clipPath id="breeze-start-airflow-line-0">
<rect x="0" y="1.5" width="1464" height="24.65"/>
@@ -486,12 +486,9 @@
<clipPath id="breeze-start-airflow-line-146">
<rect x="0" y="3563.9" width="1464" height="24.65"/>
</clipPath>
-<clipPath id="breeze-start-airflow-line-147">
- <rect x="0" y="3588.3" width="1464" height="24.65"/>
- </clipPath>
</defs>
- <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="3683.6" rx="8"/><text
class="breeze-start-airflow-title" fill="#c5c8c6" text-anchor="middle" x="740"
y="27">Command: start-airflow</text>
+ <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1"
x="1" y="1" width="1480" height="3659.2" rx="8"/><text
class="breeze-start-airflow-title" fill="#c5c8c6" text-anchor="middle" x="740"
y="27">Command: start-airflow</text>
<g transform="translate(26,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
@@ -646,10 +643,9 @@
</text><text class="breeze-start-airflow-r5" x="0" y="3484.8"
textLength="24.4"
clip-path="url(#breeze-start-airflow-line-142)">╭─</text><text
class="breeze-start-airflow-r5" x="24.4" y="3484.8" textLength="195.2"
clip-path="url(#breeze-start-airflow-line-142)"> Common options </text><text
class="breeze-start-airflow-r5" x="219.6" y="3484.8" textLength="1220"
clip-path="url(#breeze-start-airflow-line-142)">───────────────────────────────────────────────────────────────────
[...]
</text><text class="breeze-start-airflow-r5" x="0" y="3509.2"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-143)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3509.2" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-143)">--answer </text><text
class="breeze-start-airflow-r6" x="158.6" y="3509.2" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-143)">-a</text><text
class="breeze-start-airflow-r1" x="207.4" y="3509.2" textLength="329.4 [...]
</text><text class="breeze-start-airflow-r5" x="0" y="3533.6"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-144)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3533.6" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-144)">--dry-run</text><text
class="breeze-start-airflow-r6" x="158.6" y="3533.6" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-144)">-D</text><text
class="breeze-start-airflow-r1" x="207.4" y="3533.6" textLength="719.8" cli
[...]
-</text><text class="breeze-start-airflow-r5" x="0" y="3558" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-145)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3558" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-145)">--sdk    </text><text
class="breeze-start-airflow-r1" x="207.4" y="3558" textLength="305"
clip-path="url(#breeze-start-airflow-line-145)">Install SDK toolchain(s) </text><text
class="breeze-start-airf [...]
-</text><text class="breeze-start-airflow-r5" x="0" y="3582.4"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-146)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3582.4" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-146)">--verbose</text><text
class="breeze-start-airflow-r6" x="158.6" y="3582.4" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-146)">-v</text><text
class="breeze-start-airflow-r1" x="207.4" y="3582.4" textLength="585.6" cli
[...]
-</text><text class="breeze-start-airflow-r5" x="0" y="3606.8"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-147)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3606.8" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-147)">--help   </text><text
class="breeze-start-airflow-r6" x="158.6" y="3606.8" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-147)">-h</text><text
class="breeze-start-airflow-r1" x="207.4" y="3606.8" textLen [...]
-</text><text class="breeze-start-airflow-r5" x="0" y="3631.2"
textLength="1464"
clip-path="url(#breeze-start-airflow-line-148)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-start-airflow-r1" x="1464" y="3631.2" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-148)">
+</text><text class="breeze-start-airflow-r5" x="0" y="3558" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-145)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3558" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-145)">--verbose</text><text
class="breeze-start-airflow-r6" x="158.6" y="3558" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-145)">-v</text><text
class="breeze-start-airflow-r1" x="207.4" y="3558" textLength="585.6"
clip-path=" [...]
+</text><text class="breeze-start-airflow-r5" x="0" y="3582.4"
textLength="12.2" clip-path="url(#breeze-start-airflow-line-146)">│</text><text
class="breeze-start-airflow-r4" x="24.4" y="3582.4" textLength="109.8"
clip-path="url(#breeze-start-airflow-line-146)">--help   </text><text
class="breeze-start-airflow-r6" x="158.6" y="3582.4" textLength="24.4"
clip-path="url(#breeze-start-airflow-line-146)">-h</text><text
class="breeze-start-airflow-r1" x="207.4" y="3582.4" textLen [...]
+</text><text class="breeze-start-airflow-r5" x="0" y="3606.8"
textLength="1464"
clip-path="url(#breeze-start-airflow-line-147)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text
class="breeze-start-airflow-r1" x="1464" y="3606.8" textLength="12.2"
clip-path="url(#breeze-start-airflow-line-147)">
</text>
</g>
</g>
diff --git a/dev/breeze/doc/images/output_start-airflow.txt
b/dev/breeze/doc/images/output_start-airflow.txt
index 71b4385707e..fc5c2310f14 100644
--- a/dev/breeze/doc/images/output_start-airflow.txt
+++ b/dev/breeze/doc/images/output_start-airflow.txt
@@ -1 +1 @@
-0b5bd6cfdae3da14beea1b9df4ed549c
+dc6fa1ae074c8aceab338e5fbdeab30a
diff --git a/dev/breeze/src/airflow_breeze/commands/common_options.py
b/dev/breeze/src/airflow_breeze/commands/common_options.py
index 8d40ce1a179..3f8cac3419f 100644
--- a/dev/breeze/src/airflow_breeze/commands/common_options.py
+++ b/dev/breeze/src/airflow_breeze/commands/common_options.py
@@ -614,7 +614,7 @@ option_worker_types = click.option(
option_sdk = click.option(
"--sdk",
- help="Install SDK toolchain(s)",
+ help="Select SDK toolchain(s).",
type=BetterChoice(ALLOWED_SDKS),
multiple=True,
envvar="BREEZE_SDK",
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index 5e76822a35b..4c53d752236 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -348,7 +348,6 @@ option_load_default_connections = click.option(
@option_providers_skip_constraints
@option_python
@option_restart
-@option_sdk
@option_run_db_tests_only
@option_skip_db_tests
@option_skip_environment_initialization
@@ -411,7 +410,6 @@ def shell(
python: str,
quiet: bool,
restart: bool,
- sdk: tuple[str, ...],
run_db_tests_only: bool,
skip_environment_initialization: bool,
skip_db_tests: bool,
@@ -488,7 +486,6 @@ def shell(
python=python,
quiet=quiet,
restart=restart,
- sdk=sdk,
run_db_tests_only=run_db_tests_only,
skip_db_tests=skip_db_tests,
skip_image_upgrade_check=skip_image_upgrade_check,
@@ -581,7 +578,6 @@ option_executor_start_airflow = click.option(
@option_providers_skip_constraints
@option_python
@option_restart
-@option_sdk
@option_standalone_dag_processor
@option_terminal_multiplexer
@option_use_uv
@@ -632,7 +628,6 @@ def start_airflow(
providers_skip_constraints: bool,
python: str,
restart: bool,
- sdk: tuple[str, ...],
skip_assets_compilation: bool,
standalone_dag_processor: bool,
terminal_multiplexer: str,
@@ -720,7 +715,6 @@ def start_airflow(
forward_credentials=forward_credentials,
github_repository=github_repository,
worker_type=worker_type,
- sdk=sdk,
integration=integration,
install_selected_providers=install_selected_providers,
install_airflow_with_constraints=install_airflow_with_constraints,
diff --git
a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
index fe27f84f696..17d32146110 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
@@ -170,7 +170,6 @@ DEVELOPER_PARAMETERS: dict[str, list[dict[str, str |
list[str]]]] = {
"--allow-pre-releases",
"--use-distributions-from-dist",
"--install-airflow-python-client",
- "--sdk",
],
},
{
@@ -254,7 +253,6 @@ DEVELOPER_PARAMETERS: dict[str, list[dict[str, str |
list[str]]]] = {
"--github-repository",
"--builder",
"--use-uv",
- "--sdk",
],
},
{
diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py
b/dev/breeze/src/airflow_breeze/params/shell_params.py
index 1a6f6701ca1..f900fb079f2 100644
--- a/dev/breeze/src/airflow_breeze/params/shell_params.py
+++ b/dev/breeze/src/airflow_breeze/params/shell_params.py
@@ -196,7 +196,6 @@ class ShellParams:
github_actions: str = os.environ.get("GITHUB_ACTIONS", "false")
github_repository: str = APACHE_AIRFLOW_GITHUB_REPOSITORY
github_token: str = os.environ.get("GITHUB_TOKEN", "")
- sdk: tuple[str, ...] = ()
worker_type: tuple[str, ...] = ()
include_mypy_volume: bool = False
install_airflow_version: str = ""
@@ -664,8 +663,6 @@ services:
_set_var(_env, "GITHUB_TOKEN", self.github_token)
if "go" in self.worker_type:
_set_var(_env, "GO_WORKER", True)
- if "java" in self.sdk:
- _set_var(_env, "INSTALL_SDK_JAVA", True)
_set_var(_env, "HOST_GROUP_ID", self.host_group_id)
_set_var(_env, "HOST_OS", self.host_os)
_set_var(_env, "HOST_USER_ID", self.host_user_id)
diff --git a/scripts/ci/prek/check_java_sdk_version_in_sync.py
b/scripts/ci/prek/check_java_sdk_version_in_sync.py
index 02e696b7278..66f4559dd61 100644
--- a/scripts/ci/prek/check_java_sdk_version_in_sync.py
+++ b/scripts/ci/prek/check_java_sdk_version_in_sync.py
@@ -30,8 +30,13 @@ The authoritative version lives in five places that must
stay in sync:
-> java.toolchain.languageVersion.set(JavaLanguageVersion.of(<n>))
-> java.sourceCompatibility = JavaVersion.VERSION_<n>
-> kotlin.compilerOptions.jvmTarget = JvmTarget.JVM_<n>
-- scripts/docker/install_jdk.sh
- -> TEMURIN_VERSION="<n>"
+- scripts/docker/install_os_dependencies.sh
+ -> TEMURIN_VERSION=${TEMURIN_VERSION:-<n>}
+- Dockerfile
+ -> TEMURIN_VERSION=${TEMURIN_VERSION:-<n>}
+- Dockerfile.ci
+ -> TEMURIN_VERSION=${TEMURIN_VERSION:-<n>}
+ -> ENV TEMURIN_VERSION="<n>"
"""
from __future__ import annotations
@@ -94,9 +99,24 @@ SITES = [
pattern=re.compile(r"JvmTarget\.JVM_(\d+)"),
),
VersionSite(
- label="scripts/docker/install_jdk.sh (TEMURIN_VERSION)",
- path=REPO_ROOT.joinpath("scripts", "docker", "install_jdk.sh"),
- pattern=re.compile(r'^readonly TEMURIN_VERSION="(\d+)"', re.MULTILINE),
+ label="scripts/docker/install_os_dependencies.sh (TEMURIN_VERSION
default)",
+ path=REPO_ROOT.joinpath("scripts", "docker",
"install_os_dependencies.sh"),
+ pattern=re.compile(r"^TEMURIN_VERSION=\$\{TEMURIN_VERSION:-(\d+)\}",
re.MULTILINE),
+ ),
+ VersionSite(
+ label="Dockerfile (TEMURIN_VERSION heredoc default)",
+ path=REPO_ROOT.joinpath("Dockerfile"),
+ pattern=re.compile(r"^TEMURIN_VERSION=\$\{TEMURIN_VERSION:-(\d+)\}",
re.MULTILINE),
+ ),
+ VersionSite(
+ label="Dockerfile.ci (TEMURIN_VERSION heredoc default)",
+ path=REPO_ROOT.joinpath("Dockerfile.ci"),
+ pattern=re.compile(r"^TEMURIN_VERSION=\$\{TEMURIN_VERSION:-(\d+)\}",
re.MULTILINE),
+ ),
+ VersionSite(
+ label="Dockerfile.ci (ENV TEMURIN_VERSION)",
+ path=REPO_ROOT.joinpath("Dockerfile.ci"),
+ pattern=re.compile(r'^ENV TEMURIN_VERSION="(\d+)"', re.MULTILINE),
),
]
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index efaac95c996..4cbbfb0e442 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -143,10 +143,6 @@ function environment_initialization() {
export AIRFLOW__SCHEDULER__GO_WORKER=True
fi
- if [[ ${INSTALL_SDK_JAVA=} == "true" ]]; then
- "${AIRFLOW_SOURCES}/scripts/docker/install_jdk.sh"
- fi
-
RUN_TESTS=${RUN_TESTS:="false"}
CI=${CI:="false"}
diff --git a/scripts/docker/install_jdk.sh b/scripts/docker/install_jdk.sh
deleted file mode 100755
index bfdb9db4ee6..00000000000
--- a/scripts/docker/install_jdk.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# shellcheck shell=bash
-# shellcheck source=scripts/docker/common.sh
-. "$( dirname "${BASH_SOURCE[0]}" )/common.sh"
-
-set -euo pipefail
-
-common::get_colors
-
-readonly TEMURIN_VERSION="11"
-
-# Fast path: skip if the right JDK is already on PATH (e.g. repeated container
starts
-# where the container image was not rebuilt between runs).
-if java -version 2>&1 | grep -q "version \"${TEMURIN_VERSION}"; then
- echo
- echo "${COLOR_BLUE}Eclipse Temurin JDK ${TEMURIN_VERSION} is already
installed, skipping.${COLOR_RESET}"
- echo
- exit 0
-fi
-
-echo
-echo "${COLOR_BLUE}Installing Eclipse Temurin JDK ${TEMURIN_VERSION} from the
Adoptium apt repository...${COLOR_RESET}"
-echo
-
-# Add the Adoptium apt repository (https://adoptium.net/installation/linux/).
-# The Breeze CI image runs as the 'airflow' user which has passwordless sudo.
-sudo apt-get update -qq
-sudo apt-get install -y --no-install-recommends wget gnupg apt-transport-https
ca-certificates
-
-sudo mkdir -p /etc/apt/keyrings
-wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public \
- | sudo tee /etc/apt/keyrings/adoptium.asc > /dev/null
-
-# Derive the Debian codename from /etc/os-release (bookworm, focal, etc.).
-# shellcheck source=/dev/null
-DISTRO_CODENAME=$(. /etc/os-release; echo "${VERSION_CODENAME}")
-echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] \
-https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \
- | sudo tee /etc/apt/sources.list.d/adoptium.list > /dev/null
-
-sudo apt-get update -qq
-sudo apt-get install -y --no-install-recommends
"temurin-${TEMURIN_VERSION}-jdk"
-sudo apt-get clean
-sudo rm -rf /var/lib/apt/lists/*
-
-echo
-echo "${COLOR_GREEN}Eclipse Temurin JDK ${TEMURIN_VERSION} installed
successfully.${COLOR_RESET}"
-java -version
-echo
diff --git a/scripts/docker/install_os_dependencies.sh
b/scripts/docker/install_os_dependencies.sh
index ecb54ab0414..e5a540c525c 100644
--- a/scripts/docker/install_os_dependencies.sh
+++ b/scripts/docker/install_os_dependencies.sh
@@ -28,6 +28,7 @@ fi
AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION:-3.10.18}
PYTHON_LTO=${PYTHON_LTO:-true}
GOLANG_MAJOR_MINOR_VERSION=${GOLANG_MAJOR_MINOR_VERSION:-1.24.4}
+TEMURIN_VERSION=${TEMURIN_VERSION:-11}
RUSTUP_DEFAULT_TOOLCHAIN=${RUSTUP_DEFAULT_TOOLCHAIN:-stable}
RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
COSIGN_VERSION=${COSIGN_VERSION:-3.0.5}
@@ -401,6 +402,24 @@ function install_golang() {
rm -rf /usr/local/go && tar -C /usr/local -xzf
go"${GOLANG_MAJOR_MINOR_VERSION}".linux.tar.gz
}
+function install_jdk() {
+ # Install Eclipse Temurin JDK from the Adoptium apt repository
(https://adoptium.net/installation/linux/).
+ apt-get update -qq
+ apt-get install -y --no-install-recommends wget gnupg apt-transport-https
ca-certificates
+ mkdir -p /etc/apt/keyrings
+ wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public \
+ | tee /etc/apt/keyrings/adoptium.asc > /dev/null
+ # shellcheck disable=SC1091
+ DISTRO_CODENAME=$(. /etc/os-release; echo "${VERSION_CODENAME}")
+ echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] \
+https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \
+ | tee /etc/apt/sources.list.d/adoptium.list > /dev/null
+ apt-get update -qq
+ apt-get install -y --no-install-recommends "temurin-${TEMURIN_VERSION}-jdk"
+ apt-get clean
+ rm -rf /var/lib/apt/lists/*
+}
+
function install_rustup() {
local arch
arch="$(dpkg --print-architecture)"
@@ -446,6 +465,7 @@ else
install_rustup
if [[ "${INSTALLATION_TYPE}" == "CI" ]]; then
install_golang
+ install_jdk
fi
install_docker_cli
apt_clean