This is an automated email from the ASF dual-hosted git repository.
zabetak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 24f14d38e81 HIVE-29747: Add CI check to ensure Thrift code generation
run (#6618)
24f14d38e81 is described below
commit 24f14d38e81ca7d68b40ed4e7c742770c6761a30
Author: Stamatis Zampetakis <[email protected]>
AuthorDate: Tue Sep 15 10:59:52 2026 +0200
HIVE-29747: Add CI check to ensure Thrift code generation run (#6618)
---
Jenkinsfile | 16 +++++++++++++++-
pom.xml | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index c2da8e93e9a..759477a7082 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -97,8 +97,9 @@ sw java 21 && . /etc/profile.d/java.sh
mkdir -p .m2/repository
cp $SETTINGS .m2/settings.xml
OPTS=" -s $PWD/.m2/settings.xml -B -Dtest.groups= "
-OPTS+=" -Pitests,qsplits,dist,errorProne"
+OPTS+=" -Pitests,qsplits,dist,errorProne,thriftif"
OPTS+=" -Dmaven.repo.local=$PWD/.m2/repository"
+OPTS+=" -Dthrift.home=/work/thrift-0.16.0"
git config extra.mavenOpts "$OPTS"
OPTS=" $M_OPTS -Dmaven.test.failure.ignore "
if [ -s inclusions.txt ]; then OPTS+="
-Dsurefire.includesFile=$PWD/inclusions.txt";fi
@@ -285,6 +286,19 @@ fi
stage('Compile') {
buildHive("install -Dtest=noMatches")
}
+ stage('Thrift validation') {
+ sh '''#!/bin/bash -e
+set -x
+n=$(git status -s -- '*/src/gen/thrift/*' | wc -l)
+if [ $n != 0 ]; then
+ echo "ERROR: Thrift generated code is out of date!" >&2
+ echo "The following files differ:" >&2
+ git diff --stat -- '*/src/gen/thrift/*' >&2
+ exit 1
+fi
+echo "Thrift generated code is up to date."
+'''
+ }
checkPrHead()
stage('Upload') {
saveWS()
diff --git a/pom.xml b/pom.xml
index 7aeeaee4b72..14f82f05b0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,6 +185,7 @@
<kudu.version>1.17.0</kudu.version>
<!-- Leaving libfb303 at 0.9.3 regardless of libthrift: As per THRIFT-4613
The Apache Thrift project does not publish items related to fb303 at this point
-->
<libfb303.version>0.9.3</libfb303.version>
+ <!-- Thrift version must be inline with one installed in the CI (Docker
image referenced in the Jenkinsfile) -->
<libthrift.version>0.16.0</libthrift.version>
<log4j2.version>2.25.4</log4j2.version>
<mariadb.version>2.5.0</mariadb.version>