This is an automated email from the ASF dual-hosted git repository.
hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 98b4a21b421 [improvement](regression) Align regression framework
arrow/netty with fe-core and target JDK17 (#64677)
98b4a21b421 is described below
commit 98b4a21b42132f25932737fa1ce4568c83b54968
Author: Calvin Kirs <[email protected]>
AuthorDate: Wed Jul 1 10:42:51 2026 +0800
[improvement](regression) Align regression framework arrow/netty with
fe-core and target JDK17 (#64677)
## Proposed changes
Align the regression-test framework's dependency versions with fe-core
(`fe/pom.xml`):
- `arrow.version`: `17.0.0` -> `19.0.0`
- `netty-all`: `4.1.104.Final` -> `4.2.15.Final`
- `maven.compiler.source/target`: `1.8` -> `17` (Arrow 18+ requires JDK
17, and the regression build already runs on JDK 17)
This is a **dependency-alignment / JDK17-target change only**. It keeps
the framework's Arrow Flight SQL JDBC driver and netty in lockstep with
fe-core instead of drifting on older versions.
### Scope / risk
- Only `regression-test/framework/pom.xml` is touched.
- Raising `maven.compiler.target` to 17 affects the compiled output of
the whole regression framework, so this needs full regression CI to
validate, not just a local build.
- It does **not** fix the intermittent `arrow_flight_sql_p0` close-time
buffer leak — that has a separate root cause and will be handled in a
follow-up.
---------
Co-authored-by: Dongyang Li <[email protected]>
---
regression-test/framework/pom.xml | 11 ++++----
regression-test/pipeline/cloud_p0/run.sh | 5 +++-
regression-test/pipeline/common/doris-utils.sh | 8 +++---
regression-test/pipeline/vault_p0/run.sh | 5 +++-
.../test_nereids_show_create_storage_vault.groovy | 4 +--
run-regression-test.sh | 30 +++++++++++++++++++---
6 files changed, 45 insertions(+), 18 deletions(-)
diff --git a/regression-test/framework/pom.xml
b/regression-test/framework/pom.xml
index 91d97ec1071..45b589185b8 100644
--- a/regression-test/framework/pom.xml
+++ b/regression-test/framework/pom.xml
@@ -69,8 +69,8 @@ under the License.
<doris.thrift.executable>${doris.home}/thirdparty/installed/bin/thrift</doris.thrift.executable>
<doris.thrift.source>${doris.home}/gensrc/thrift</doris.thrift.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
<revision>1.0-SNAPSHOT</revision>
<project.scm.id>github</project.scm.id>
<groovy.version>4.0.19</groovy.version>
@@ -78,8 +78,9 @@ under the License.
<hadoop.version>2.8.0</hadoop.version>
<aws-java-sdk-s3.version>1.11.95</aws-java-sdk-s3.version>
<jackson.version>2.13.5</jackson.version>
- <!-- Arrow 18 only supports jdk17 -->
- <arrow.version>17.0.0</arrow.version>
+ <!-- Aligned with fe (fe/pom.xml). Arrow 18+ requires jdk17; the
regression
+ framework now targets jdk17, so this matches fe-core. -->
+ <arrow.version>19.0.0</arrow.version>
</properties>
<profiles>
<profile>
@@ -488,7 +489,7 @@ under the License.
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
- <version>4.1.104.Final</version>
+ <version>4.2.15.Final</version>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
diff --git a/regression-test/pipeline/cloud_p0/run.sh
b/regression-test/pipeline/cloud_p0/run.sh
index a011fb954be..7728cd94698 100644
--- a/regression-test/pipeline/cloud_p0/run.sh
+++ b/regression-test/pipeline/cloud_p0/run.sh
@@ -74,8 +74,11 @@ run() {
sed -i
"s/oss-cn-hongkong.aliyuncs.com/oss-cn-hongkong-internal.aliyuncs.com/"
"${teamcity_build_checkoutDir}"/docker/thirdparties/custom_settings.env
if bash
"${teamcity_build_checkoutDir}"/docker/thirdparties/run-thirdparties-docker.sh
--stop; then echo; fi
if bash
"${teamcity_build_checkoutDir}"/docker/thirdparties/run-thirdparties-docker.sh
-c kafka; then echo; else echo "ERROR: start kafka docker failed"; fi
- JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed
-n '1p')"
+ # Run the regression suite under JDK 17: the Arrow Flight SQL JDBC driver
(arrow 19)
+ # is Java 11+ bytecode and cannot be loaded by a JDK 8 runtime.
+ JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-17-*' | sed
-n '1p')"
export JAVA_HOME
+ export PATH="${JAVA_HOME}/bin:${PATH}"
if "${teamcity_build_checkoutDir}"/run-regression-test.sh \
--teamcity \
--run \
diff --git a/regression-test/pipeline/common/doris-utils.sh
b/regression-test/pipeline/common/doris-utils.sh
index cbc27ee6999..00b6bc9f40a 100644
--- a/regression-test/pipeline/common/doris-utils.sh
+++ b/regression-test/pipeline/common/doris-utils.sh
@@ -985,9 +985,9 @@ prepare_java_udf() {
# custom_lib相关的case需要在fe启动前把编译好的jar放到 $DORIS_HOME/fe/custom_lib/
install_java
install_maven
- OLD_JAVA_HOME=${JAVA_HOME}
- JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed
-n '1p')"
- export JAVA_HOME
+ # Build with the ambient JDK (>=17 in CI): the regression framework is
compiled with it,
+ # while run-regression-test.sh internally switches to JDK 8 only for the
Java UDF module
+ # (which must stay Java 8 for the BE embedded JVM).
bash "${DORIS_HOME}"/../run-regression-test.sh --clean
if bash "${DORIS_HOME}"/../run-regression-test.sh --compile ||
bash "${DORIS_HOME}"/../run-regression-test.sh --compile ||
@@ -996,8 +996,6 @@ prepare_java_udf() {
else
echo "ERROR: failed to compile java udf"
fi
- JAVA_HOME=${OLD_JAVA_HOME}
- export JAVA_HOME
if ls "${DORIS_HOME}"/fe/custom_lib/*.jar &&
ls "${DORIS_HOME}"/be/custom_lib/*.jar; then
diff --git a/regression-test/pipeline/vault_p0/run.sh
b/regression-test/pipeline/vault_p0/run.sh
index 9a86d3cda20..a8a252b554f 100644
--- a/regression-test/pipeline/vault_p0/run.sh
+++ b/regression-test/pipeline/vault_p0/run.sh
@@ -114,8 +114,11 @@ services:
network_mode: "host"
'
if echo "${docker_compose_hdfs_yaml}" >docker-compose.yaml &&
docker-compose up -d; then echo; else echo "ERROR: start hdfs docker failed"; fi
- JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed
-n '1p')"
+ # Run the regression suite under JDK 17: the Arrow Flight SQL JDBC driver
(arrow 19)
+ # is Java 11+ bytecode and cannot be loaded by a JDK 8 runtime.
+ JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-17-*' | sed
-n '1p')"
export JAVA_HOME
+ export PATH="${JAVA_HOME}/bin:${PATH}"
if "${teamcity_build_checkoutDir}"/run-regression-test.sh \
--teamcity \
--run \
diff --git
a/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
b/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
index fc38f3b22a3..2e1504218fd 100644
---
a/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
+++
b/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
@@ -83,11 +83,11 @@ suite("test_show_create_storage_vault_command") {
def hdfsVaultInfo = try_sql """SHOW CREATE STORAGE VAULT
${hdfsVaultName}"""
def s3VaultInfo = try_sql """SHOW CREATE STORAGE VAULT ${s3VaultName}"""
- if (hdfsVaultInfo.size == 1) {
+ if (hdfsVaultInfo.size() == 1) {
hdfsVaultExist = true
}
- if (s3VaultInfo.size == 1) {
+ if (s3VaultInfo.size() == 1) {
s3VaultExist = true
}
diff --git a/run-regression-test.sh b/run-regression-test.sh
index ebf2ecf5f6b..87143a2cda5 100755
--- a/run-regression-test.sh
+++ b/run-regression-test.sh
@@ -225,13 +225,35 @@ if ! test -f ${RUN_JAR:+${RUN_JAR}}; then
echo "===== BUILD JAVA_UDF_SRC TO GENERATE JAR ====="
mkdir -p "${DORIS_HOME}"/regression-test/suites/javaudf_p0/jars
cd "${DORIS_HOME}"/regression-test/java-udf-src || { echo "Failed to
change directory to java-udf-src"; exit 1; }
-
+
+ # The Java UDF jar must be built with JDK 8 (source/target 8, loaded by
the BE embedded
+ # JVM), while the framework above is built with the ambient JDK (>=17 in
CI). Switch to a
+ # JDK 8 just for this module, falling back to the ambient JDK if none is
installed
+ # (e.g. local dev boxes).
+ udf_prev_java_home="${JAVA_HOME:-}"
+ udf_jdk8_home="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*'
2>/dev/null | sed -n '1p')"
+ if [[ -n "${udf_jdk8_home}" ]]; then
+ echo "Building Java UDF with JDK 8 at ${udf_jdk8_home}"
+ export JAVA_HOME="${udf_jdk8_home}"
+ else
+ echo "WARNING: no JDK 8 found under /usr/lib/jvm; building Java UDF
with ${JAVA_HOME:-the current JDK}"
+ fi
+
# Build UDF with retry
- execute_maven_with_retry "${MVN_CMD} clean package -B -DskipTests=true
-Dmaven.javadoc.skip=true" || {
+ udf_build_rc=0
+ execute_maven_with_retry "${MVN_CMD} clean package -B -DskipTests=true
-Dmaven.javadoc.skip=true" || udf_build_rc=1
+
+ # Restore the framework JDK regardless of the UDF build result.
+ if [[ -n "${udf_prev_java_home}" ]]; then
+ export JAVA_HOME="${udf_prev_java_home}"
+ else
+ unset JAVA_HOME
+ fi
+ if [[ "${udf_build_rc}" -ne 0 ]]; then
echo "Failed to build UDF package"
exit 1
- }
-
+ fi
+
cp target/java-udf-case-jar-with-dependencies.jar
"${DORIS_HOME}"/regression-test/suites/javaudf_p0/jars/
# be and fe dir is compiled output
mkdir -p "${DORIS_HOME}"/output/fe/custom_lib/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]