From 7bf0f57239958fccd5bdcd76f2a953623a5d2575 Mon Sep 17 00:00:00 2001 From: zhouyifan279 Date: Mon, 3 Jun 2024 11:08:47 +0800 Subject: [PATCH] [KYUUBI #6441] Kyuubi Spark TPC-DS/H Connector cross version test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— This pull request adds cross-version tests for Kyuubi Spark TPC-DS Connector and TPC-H Connector. ## Describe Your Solution ๐Ÿ”ง Add TPC-DS Connector and TPC-H Connector into GitHub Actions job `spark-connector-cross-version-test`. ## Types of changes :bookmark: - [ ] Bugfix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช #### Behavior Without This Pull Request :coffin: #### Behavior With This Pull Request :tada: #### Related Unit Tests --- # Checklist ๐Ÿ“ - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6441 from zhouyifan279/tcp-ds/h-cross-version. Closes #6441 c2abc468a [zhouyifan279] Kyuubi Spark TPC-DS/H Connector cross version test Authored-by: zhouyifan279 Signed-off-by: Cheng Pan --- .github/workflows/master.yml | 17 ++++---- .../kyuubi-spark-connector-tpcds/pom.xml | 41 +++++++++++++++++++ .../spark/kyuubi-spark-connector-tpch/pom.xml | 41 +++++++++++++++++++ 3 files changed, 91 insertions(+), 8 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 6b4cb552e..41394a520 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -190,6 +190,9 @@ jobs: comment: [ "normal" ] env: SPARK_LOCAL_IP: localhost + TEST_MODULES: "extensions/spark/kyuubi-spark-connector-hive,\ + extensions/spark/kyuubi-spark-connector-tpcds,\ + extensions/spark/kyuubi-spark-connector-tpch" steps: - uses: actions/checkout@v4 - name: Free up disk space @@ -205,16 +208,14 @@ jobs: check-latest: false - name: Setup Maven uses: ./.github/actions/setup-maven - - name: Build Kyuubi Spark Hive Connector with Spark-${{ matrix.spark-compile }} + - name: Build Kyuubi Spark Connectors with Spark-${{ matrix.spark-compile }} run: | - ./build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-spark-connector-hive -am \ - -Pjava-${{ matrix.java }} -Pscala-${{ matrix.scala }} -Pspark-${{ matrix.spark-compile }} \ - -DskipTests - - name: Test Kyuubi Spark Hive Connector with Spark-${{ matrix.spark-runtime }} + ./build/mvn clean install ${MVN_OPT} -pl ${TEST_MODULES} -am -Pjava-${{ matrix.java }} \ + -Pscala-${{ matrix.scala }} -Pspark-${{ matrix.spark-compile }} -DskipTests + - name: Test Kyuubi Spark Connectors with Spark-${{ matrix.spark-runtime }} run: | - ./build/mvn test ${MVN_OPT} -pl extensions/spark/kyuubi-spark-connector-hive \ - -Pjava-${{ matrix.java }} -Pscala-${{ matrix.scala }} -Pspark-${{ matrix.spark-runtime }} \ - -Pcross-version-test + ./build/mvn test ${MVN_OPT} -pl ${TEST_MODULES} -Pjava-${{ matrix.java }} \ + -Pscala-${{ matrix.scala }} -Pspark-${{ matrix.spark-runtime }} -Pcross-version-test - name: Upload test logs if: failure() uses: actions/upload-artifact@v3 diff --git a/extensions/spark/kyuubi-spark-connector-tpcds/pom.xml b/extensions/spark/kyuubi-spark-connector-tpcds/pom.xml index 53e229d4c..6d27d01ee 100644 --- a/extensions/spark/kyuubi-spark-connector-tpcds/pom.xml +++ b/extensions/spark/kyuubi-spark-connector-tpcds/pom.xml @@ -202,4 +202,45 @@ target/scala-${scala.binary.version}/classes target/scala-${scala.binary.version}/test-classes + + + + cross-version-test + + + org.apache.kyuubi + kyuubi-spark-connector-tpcds-local_${scala.binary.version} + ${project.version} + system + ${project.basedir}/target/kyuubi-spark-connector-tpcds_${scala.binary.version}-${project.version}.jar + + + + + + org.apache.maven.plugins + maven-clean-plugin + + true + + + target/scala-${scala.binary.version}/classes + **/*.* + + + + + + clean target/scala-${scala.binary.version}/classes + + clean + + process-test-classes + + + + + + + diff --git a/extensions/spark/kyuubi-spark-connector-tpch/pom.xml b/extensions/spark/kyuubi-spark-connector-tpch/pom.xml index 33f7c7ef4..458df4bdc 100644 --- a/extensions/spark/kyuubi-spark-connector-tpch/pom.xml +++ b/extensions/spark/kyuubi-spark-connector-tpch/pom.xml @@ -208,4 +208,45 @@ target/scala-${scala.binary.version}/classes target/scala-${scala.binary.version}/test-classes + + + + cross-version-test + + + org.apache.kyuubi + kyuubi-spark-connector-tpch-local_${scala.binary.version} + ${project.version} + system + ${project.basedir}/target/kyuubi-spark-connector-tpch_${scala.binary.version}-${project.version}.jar + + + + + + org.apache.maven.plugins + maven-clean-plugin + + true + + + target/scala-${scala.binary.version}/classes + **/*.* + + + + + + clean target/scala-${scala.binary.version}/classes + + clean + + process-test-classes + + + + + + +