diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9417590f9142..c18fb09bdea9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,337 +34,14 @@ concurrency: cancel-in-progress: true jobs: - maven-checks: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java-version: - - 11 - - 17 - timeout-minutes: 45 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Maven Checks - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install -B --strict-checksums -V -T C1 -DskipTests -P ci -pl '!:trino-server-rpm' - - name: Test Server RPM - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY bash -c "$MAVEN verify -B --strict-checksums -P ci -pl :trino-server-rpm || find core/trino-server-rpm/ -exec ls -ald {} +" - - name: Clean Maven Output - run: $MAVEN clean -pl '!:trino-server,!:trino-cli' - - uses: docker/setup-qemu-action@v1 - with: - platforms: arm64 - - name: Test Docker Image - run: core/docker/build-local.sh - - error-prone-checks: - runs-on: ubuntu-latest - timeout-minutes: 45 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Error Prone Checks - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - # Run Error Prone on one module with a retry to ensure all runtime dependencies are fetched - $RETRY $MAVEN ${MAVEN_TEST} -T C1 clean test-compile -P errorprone-compiler -pl ':trino-spi' - # The main Error Prone run - $MAVEN ${MAVEN_TEST} -T C1 clean test-compile -P errorprone-compiler \ - -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - web-ui-checks: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v2 - - name: Web UI Checks - run: core/trino-main/bin/check_webui.sh - - test-jdbc-compatibility: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # checkout tags so version in Manifest is set properly - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -pl '!:trino-test-jdbc-compatibility-old-driver,!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Test old JDBC vs current server - run: testing/trino-test-jdbc-compatibility-old-driver/bin/run_tests.sh - - name: Test current JDBC vs old server - if: always() - run: $MAVEN test ${MAVEN_TEST} -pl :trino-test-jdbc-compatibility-old-server - - name: Upload test results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result ${{ github.job }} - path: | - **/target/surefire-reports - **/target/checkstyle-* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report ${{ github.job }} - path: | - **/surefire-reports/TEST-*.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - - hive-tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - config-empty - - config-hdp3 - # TODO: config-cdh5 - # TODO: config-apache-hive3 - timeout-minutes: 60 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Install Hive Module - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -am -pl :trino-hive-hadoop2 - - name: Run Hive Tests - run: | - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_tests.sh - - name: Run Hive S3 Tests - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESSKEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRETKEY }} - S3_BUCKET: "presto-ci-test" - S3_BUCKET_ENDPOINT: "s3.us-east-2.amazonaws.com" - run: | - if [ "${AWS_ACCESS_KEY_ID}" != "" ]; then - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_s3_tests.sh - fi - - name: Run Hive Glue Tests - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESSKEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRETKEY }} - AWS_REGION: us-east-2 - run: | - if [ "${AWS_ACCESS_KEY_ID}" != "" ]; then - $MAVEN test ${MAVEN_TEST} -pl :trino-hive -P test-hive-glue - fi - - name: Run Hive Azure ABFS Access Key Tests - if: matrix.config != 'config-empty' # Hive 1.x does not support Azure storage - env: - ABFS_CONTAINER: ${{ secrets.AZURE_ABFS_CONTAINER }} - ABFS_ACCOUNT: ${{ secrets.AZURE_ABFS_ACCOUNT }} - ABFS_ACCESS_KEY: ${{ secrets.AZURE_ABFS_ACCESSKEY }} - run: | - if [ "${ABFS_CONTAINER}" != "" ]; then - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_abfs_access_key_tests.sh - fi - - name: Run Hive Azure ABFS OAuth Tests - if: matrix.config != 'config-empty' # Hive 1.x does not support Azure storage - env: - ABFS_CONTAINER: ${{ secrets.AZURE_ABFS_CONTAINER }} - ABFS_ACCOUNT: ${{ secrets.AZURE_ABFS_ACCOUNT }} - ABFS_OAUTH_ENDPOINT: ${{ secrets.AZURE_ABFS_OAUTH_ENDPOINT }} - ABFS_OAUTH_CLIENTID: ${{ secrets.AZURE_ABFS_OAUTH_CLIENTID }} - ABFS_OAUTH_SECRET: ${{ secrets.AZURE_ABFS_OAUTH_SECRET }} - run: | - if [ -n "$ABFS_CONTAINER" ]; then - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_abfs_oauth_tests.sh - fi - - name: Run Hive Azure WASB Tests - if: matrix.config != 'config-empty' # Hive 1.x does not support Azure storage - env: - WASB_CONTAINER: ${{ secrets.AZURE_WASB_CONTAINER }} - WASB_ACCOUNT: ${{ secrets.AZURE_WASB_ACCOUNT }} - WASB_ACCESS_KEY: ${{ secrets.AZURE_WASB_ACCESSKEY }} - run: | - if [ "${WASB_CONTAINER}" != "" ]; then - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_wasb_tests.sh - fi - - name: Run Hive Azure ADL Tests - if: matrix.config != 'config-empty' # Hive 1.x does not support Azure storage - env: - ADL_NAME: ${{ secrets.AZURE_ADL_NAME }} - ADL_CLIENT_ID: ${{ secrets.AZURE_ADL_CLIENTID }} - ADL_CREDENTIAL: ${{ secrets.AZURE_ADL_CREDENTIAL }} - ADL_REFRESH_URL: ${{ secrets.AZURE_ADL_REFRESHURL }} - run: | - if [ "${ADL_NAME}" != "" ]; then - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_adl_tests.sh - fi - - name: Run Hive Alluxio Tests - run: | - source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh && - plugin/trino-hive-hadoop2/bin/run_hive_alluxio_tests.sh - - name: Upload test results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result ${{ github.job }} - path: | - **/target/surefire-reports - **/target/checkstyle-* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report ${{ github.job }} (${{ matrix.config }}) - path: | - **/surefire-reports/TEST-*.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - - test-other-modules: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Maven Tests - run: | - $MAVEN test ${MAVEN_TEST} -pl ' - !:trino-main, - !:trino-tests, - !:trino-raptor-legacy, - !:trino-accumulo, - !:trino-cassandra, - !:trino-clickhouse, - !:trino-hive, - !:trino-elasticsearch, - !:trino-mongodb, - !:trino-kafka, - !:trino-pinot, - !:trino-redis, - !:trino-mysql, - !:trino-postgresql, - !:trino-sqlserver, - !:trino-oracle, - !:trino-kudu, - !:trino-druid, - !:trino-iceberg, - !:trino-phoenix,!:trino-phoenix5, - !:trino-jdbc,!:trino-base-jdbc,!:trino-thrift,!:trino-memory, - !:trino-docs,!:trino-server,!:trino-server-rpm, - !:trino-test-jdbc-compatibility-old-server, - !:trino-memsql, - !:trino-bigquery' - - name: Upload test results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result ${{ github.job }} - path: | - **/target/surefire-reports - **/target/checkstyle-* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report ${{ github.job }} - path: | - **/surefire-reports/TEST-*.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: modules: - - ":trino-main" - - ":trino-tests" - - ":trino-raptor-legacy" - - ":trino-accumulo" - - ":trino-cassandra" - ":trino-clickhouse" - - ":trino-hive" - - ":trino-hive -P test-parquet" - - ":trino-hive -P test-failure-recovery" - - ":trino-hive -P test-fault-tolerant-execution" - - ":trino-elasticsearch,:trino-elasticsearch -P test-stats" - - ":trino-mongodb" - - ":trino-kafka" - - ":trino-pinot" - - ":trino-redis" - - ":trino-mysql" - - ":trino-postgresql" - - ":trino-sqlserver" - - ":trino-oracle" - - ":trino-kudu" - - ":trino-druid" - - ":trino-iceberg" - - ":trino-phoenix,:trino-phoenix5" - - ":trino-jdbc,:trino-base-jdbc,:trino-thrift,:trino-memory" + i: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49] timeout-minutes: 60 steps: - uses: actions/checkout@v2 @@ -410,235 +87,3 @@ jobs: path: | **/surefire-reports/TEST-*.xml retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - - test-memsql: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Cleanup node - # This is required as a virtual environment update 20210219.1 left too little space for MemSQL to work - run: .github/bin/cleanup-node.sh - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -am -pl :trino-memsql - - name: Memsql Tests - env: - MEMSQL_LICENSE: ${{ secrets.MEMSQL_LICENSE }} - run: | - if [ "${MEMSQL_LICENSE}" != "" ]; then - $MAVEN test ${MAVEN_TEST} -pl :trino-memsql -Dmemsql.license=${MEMSQL_LICENSE} - fi - - name: Upload test results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result ${{ github.job }} - path: | - **/target/surefire-reports - **/target/checkstyle-* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report ${{ github.job }} - path: | - **/surefire-reports/TEST-*.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - - test-bigquery: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Configure Problem Matchers - run: | - echo "::add-matcher::.github/problem-matcher.json" - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -am -pl :trino-bigquery - - name: Basic BigQuery Tests - run: $MAVEN test ${MAVEN_TEST} -pl :trino-bigquery - - name: Cloud BigQuery Tests - env: - BIGQUERY_CREDENTIALS_KEY: ${{ secrets.BIGQUERY_CREDENTIALS_KEY }} - run: | - if [ "${BIGQUERY_CREDENTIALS_KEY}" != "" ]; then - $MAVEN test ${MAVEN_TEST} -pl :trino-bigquery -Pcloud-tests -Dbigquery.credentials-key="${BIGQUERY_CREDENTIALS_KEY}" - fi - - name: Cloud BigQuery Case Insensitive Mapping Tests - env: - BIGQUERY_CREDENTIALS_KEY: ${{ secrets.BIGQUERY_CASE_INSENSITIVE_CREDENTIALS_KEY }} - run: | - if [ "${BIGQUERY_CREDENTIALS_KEY}" != "" ]; then - $MAVEN test ${MAVEN_TEST} -pl :trino-bigquery -Pcloud-tests-case-insensitive-mapping -Dbigquery.credentials-key="${BIGQUERY_CREDENTIALS_KEY}" - fi - - name: Upload test results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result ${{ github.job }} - path: | - **/target/surefire-reports - **/target/checkstyle-* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report ${{ github.job }} - path: | - **/surefire-reports/TEST-*.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} - - pt: - runs-on: ubuntu-latest - # explicitly define the name to avoid adding the value of the `ignore exclusion if` matrix item - name: pt (${{ matrix.config }}, ${{ matrix.suite }}, ${{ matrix.jdk }}) - strategy: - fail-fast: false - matrix: - config: - - default - - hdp3 - - cdh5 - # TODO: config-apache-hive3 - suite: - - suite-1 - - suite-2 - - suite-3 - # suite-4 does not exist - - suite-5 - jdk: - - 11 - exclude: - - config: cdh5 - ignore exclusion if: >- - ${{ github.event_name != 'pull_request' - || contains(github.event.pull_request.labels.*.name, 'tests:all') - || contains(github.event.pull_request.labels.*.name, 'tests:hive') - }} - - - config: default - ignore exclusion if: >- - ${{ github.event_name != 'pull_request' - || contains(github.event.pull_request.labels.*.name, 'tests:all') - || contains(github.event.pull_request.labels.*.name, 'tests:hive') - }} - - ignore exclusion if: - # Do not use this property outside of the matrix configuration. - # - # This is added to all matrix entries so they may be conditionally - # excluded by adding them to the excludes list with a GHA expression - # for this property. - # - If the expression evaluates to true, it will never match the a - # actual value of the property, and will therefore not be excluded. - # - If the expression evaluates to false, it will match the actual - # value of the property, and the exclusion will apply normally. - - false - include: - # this suite is not meant to be run with different configs - - config: default - suite: suite-6-non-generic - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-7-non-generic - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-8-non-generic - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-tpcds - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-oauth2 - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-ldap - jdk: 11 - # this suite is not meant to be run with different configs - - config: default - suite: suite-compatibility - jdk: 11 - # this suite is designed specifically for apache-hive3. TODO remove the suite once we can run all regular tests on apache-hive3. - - config: apache-hive3 - suite: suite-hms-only - jdk: 11 - # suite-1 does not contain Kerberos/encrypted Hive environments - - config: hdp3 - suite: suite-1 - jdk: 17 - # suite-2 contains Kerberos/encrypted Hive environments - - config: hdp3 - suite: suite-2 - jdk: 17 - # PT Launcher's timeout defaults to 2h, account for preparation steps (compilation) and add some margin - timeout-minutes: 140 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - cache: 'maven' - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -pl '!:trino-docs,!:trino-server-rpm' - - name: Free Disk Space - run: | - docker image prune -af - sudo apt-get clean - rm -rf ~/.m2/repository - - name: Product Tests - run: | - testing/bin/ptl suite run \ - --suite ${{ matrix.suite }} --config config-${{ matrix.config }} --bind=off --logs-dir logs/ --timeout 2h \ - --trino-jdk-version zulu_${{ matrix.jdk }} - - name: Upload test logs and results - uses: actions/upload-artifact@v2 - # Upload all test reports only on failure, because the artifacts are large - if: failure() - with: - name: result pt (${{ matrix.config }}, ${{ matrix.suite }}, ${{ matrix.jdk }}) - path: | - testing/trino-product-tests/target/* - logs/* - - name: Upload test report - uses: actions/upload-artifact@v2 - # Always upload the test report for the annotate.yml workflow, - # but only the single XML file to keep the artifact small - if: always() - with: - # Name prefix is checked in the `Annotate checks` workflow - name: test report pt (${{ matrix.config }}, ${{ matrix.suite }}, ${{ matrix.jdk }}) - path: testing/trino-product-tests/target/reports/**/testng-results.xml - retention-days: ${{ env.TEST_REPORT_RETENTION_DAYS }} diff --git a/plugin/trino-clickhouse/pom.xml b/plugin/trino-clickhouse/pom.xml index 111695db1504..45f79475af4c 100644 --- a/plugin/trino-clickhouse/pom.xml +++ b/plugin/trino-clickhouse/pom.xml @@ -187,29 +187,4 @@ test - - - - default - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - **/TestAltinityConnectorSmokeTest.java - **/TestAltinityLatestConnectorSmokeTest.java - **/TestClickHouseLatestConnectorSmokeTest.java - - - - - - -