From 09a78d17d4deb24940b4c5c35fea3a504d59bdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bobowski?= Date: Mon, 23 Sep 2024 12:58:32 -0700 Subject: [PATCH] SNOW-1658905 Do not run Iceberg ITs --- .github/workflows/IntegrationTest.yml | 2 +- test/build_runtime_jar.sh | 32 ++++++++++++++++++--------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml index 693112009..3f347250b 100644 --- a/.github/workflows/IntegrationTest.yml +++ b/.github/workflows/IntegrationTest.yml @@ -68,7 +68,7 @@ jobs: SHELL: "/bin/bash" run: | cd test - ./build_runtime_jar.sh ../../snowflake-kafka-connector + ./build_runtime_jar.sh ../../snowflake-kafka-connector verify apache ${{ matrix.snowflake_cloud }} # Commented out because the build was very unstable # Error that might be a hint: {'detail': ErrorDetail(string='Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected available in 383 seconds.', code='throttled')} diff --git a/test/build_runtime_jar.sh b/test/build_runtime_jar.sh index 649d4575d..55fb1834a 100755 --- a/test/build_runtime_jar.sh +++ b/test/build_runtime_jar.sh @@ -10,29 +10,33 @@ function error_exit() { } # check argument number is 1 or 2 or 3 -if [ $# -gt 3 ] || [ $# -lt 1 ]; then - error_exit "Usage: ./build_runtime_jar.sh [] [verify/package/none] [apache/confluent]. - Default for Second argument is verify and third argument is apache. Exiting script" +if [ $# -gt 4 ] || [ $# -lt 1 ]; then + error_exit "Usage: ./build_runtime_jar.sh [] [verify/package/none] [apache/confluent] [AWS/AZURE/GCP]. + Default values are: verify, apache, AWS. Exiting script" fi SNOWFLAKE_CONNECTOR_PATH=$1 BUILD_METHOD=$2 BUILD_FOR_RUNTIME=$3 +BUILD_FOR_CLOUD=$4 if [[ -z "${BUILD_METHOD}" ]]; then # Default build method verify BUILD_METHOD="verify" fi -# Set POM file name based on target kafka runtime environment -if [[ -z "${BUILD_FOR_RUNTIME}" ]]; then - # Default build target is for Apache - BUILD_FOR_RUNTIME="apache" - POM_FILE_NAME="pom.xml" -fi - if [[ $BUILD_FOR_RUNTIME == "confluent" ]]; then POM_FILE_NAME="pom_confluent.xml" +else + # Default build target is for Apache + BUILD_FOR_RUNTIME="apache" + POM_FILE_NAME="pom.xml" +fi + +# Some of the integration tests use cloud vendor specific resources +if [[ -z "${BUILD_FOR_CLOUD}" ]]; then + # Default + BUILD_FOR_CLOUD="AWS" fi # check if connector path is set or checkout from github master @@ -80,8 +84,14 @@ case $BUILD_METHOD in verify) # mvn clean should clean the target directory, hence using default pom.xml mvn -f $POM_FILE_NAME clean + # mvn verify runs the integration test - mvn -f $POM_FILE_NAME verify -Dgpg.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + if [BUILD_FOR_CLOUD == "AWS"]; then + # skip Iceberg tests outside of AWS + mvn -f $POM_FILE_NAME verify -Dgpg.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + else + mvn -f $POM_FILE_NAME verify -Dgpg.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 '-Dtest=!*Iceberg*IT' + fi ;; package) # mvn clean should clean the target directory, hence using default pom.xml