Skip to content

Commit

Permalink
Merge branch 'trinodb:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
krvikash authored Sep 23, 2024
2 parents db72c09 + 99b456a commit 54eb677
Show file tree
Hide file tree
Showing 3,579 changed files with 127,451 additions and 45,542 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ Disable the following inspections:

- ``Java | Performance | Call to 'Arrays.asList()' with too few arguments``,
- ``Java | Abstraction issues | 'Optional' used as field or parameter type``,
- ``Java | Code style issues | Local variable or parameter can be 'final'``,
- ``Java | Data flow | Boolean method is always inverted``.

Update the following inspections:
Expand Down Expand Up @@ -239,17 +240,17 @@ folder). You must have [Node.js](https://nodejs.org/en/download/) and
[Yarn](https://yarnpkg.com/en/) installed to execute these commands. To update
this folder after making changes, simply run:

yarn --cwd core/trino-main/src/main/resources/webapp/src install
yarn --cwd core/trino-web-ui/src/main/resources/webapp/src install

If no Javascript dependencies have changed (i.e., no changes to `package.json`),
it is faster to run:

yarn --cwd core/trino-main/src/main/resources/webapp/src run package
yarn --cwd core/trino-web-ui/src/main/resources/webapp/src run package

To simplify iteration, you can also run in `watch` mode, which automatically
re-compiles when changes to source files are detected:

yarn --cwd core/trino-main/src/main/resources/webapp/src run watch
yarn --cwd core/trino-web-ui/src/main/resources/webapp/src run watch

To iterate quickly, simply re-build the project in IntelliJ after packaging is
complete. Project resources will be hot-reloaded and changes are reflected on
Expand Down
29 changes: 17 additions & 12 deletions .github/actions/process-test-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ runs:
testing/trino-product-tests/target/*
logs/*
retention-days: 5
- name: Upload test report
uses: actions/upload-artifact@v4
# Always upload the test report for the annotate.yml workflow,
# but only the single XML file to keep the artifact small
with:
# Name prefix is checked in the `Annotate checks` workflow
name: test report ${{ inputs.artifact-name }}
if-no-files-found: 'ignore'
path: |
**/surefire-reports/TEST-*.xml
testing/trino-product-tests/target/reports/**/testng-results.xml
retention-days: 5
- name: Upload heap dump
uses: actions/upload-artifact@v4
if: format('{0}', inputs.upload-heap-dump) == 'true'
Expand All @@ -49,3 +37,20 @@ runs:
path: |
**/*.hprof
retention-days: 14
- name: Process unit and integration test reports
uses: trinodb/github-actions/action-surefire-report@b63800bedfbc7ab1ff2e5fe7eaecf5ab82ce6a70
if: format('{0}', inputs.has-failed-tests) == 'true'
with:
# this workflow should never fail, as it is not a quality gateway
fail_if_no_tests: false
# don't create or update checks, only annotate current job
skip_publishing: true
- name: Process Product Test reports
uses: starburstdata/action-testng-report@f245422953fb97ec5075d07782a1b596124b7cc4
if: format('{0}', inputs.has-failed-tests) == 'true'
with:
# this workflow should never fail, as it is not a quality gateway
fail_if_empty: false
github_token: ${{ github.token }}
# don't create or update checks, only annotate current job
skip_publishing: true
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Verify checked out commits and setup Java"
inputs:
java-version:
description: "Java version to setup"
default: 22
default: 23
cache:
description: "Cache Maven repo (true/false/restore)"
default: restore
Expand Down
2 changes: 1 addition & 1 deletion .github/config/labeler-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ release-notes:

ui:
- changed-files:
- any-glob-to-any-file: 'core/trino-main/src/main/resources/webapp/**'
- any-glob-to-any-file: 'core/trino-web-ui/**'
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
dependency-updates:
applies-to: version-updates
update-types:
- major
- minor
- patch
security-updates:
applies-to: security-updates
dependency-type: production
64 changes: 0 additions & 64 deletions .github/workflows/annotate.yml

This file was deleted.

54 changes: 26 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
repository_dispatch:
types: [test-with-secrets-command]

Expand All @@ -21,7 +22,7 @@ env:
MAVEN: ./mvnw
MAVEN_OPTS: "-Xmx512M -XX:+ExitOnOutOfMemoryError"
MAVEN_INSTALL_OPTS: "-Xmx3G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all"
MAVEN_FAST_INSTALL: "-B -V -T 1C -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all"
MAVEN_COMPILE_COMMITS: "-B --quiet -T 1C -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all=true -Dmaven.javadoc.skip=true --no-snapshot-updates --no-transfer-progress -pl '!:trino-server-rpm'"
MAVEN_GIB: "-P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}"
MAVEN_TEST: "-B -Dmaven.source.skip=true -Dair.check.skip-all --fail-at-end -P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}"
Expand Down Expand Up @@ -56,8 +57,8 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 22, cache: 'restore', cleanup-node: false }
- { java-version: 23-ea, cache: 'restore', cleanup-node: true }
- { java-version: 23, cache: 'restore', cleanup-node: true }
- { java-version: 24-ea, cache: 'restore', cleanup-node: true }
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
Expand All @@ -72,7 +73,7 @@ jobs:
with:
cache: ${{ matrix.cache }}
java-version: ${{ matrix.java-version }}
cleanup-node: ${{ matrix.cleanup-node }}
cleanup-node: true
- name: Check SPI backward compatibility
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
Expand Down Expand Up @@ -118,7 +119,7 @@ jobs:
$MAVEN failsafe:integration-test failsafe:verify -B --strict-checksums -P ci -pl :trino-jdbc
- name: Clean Maven Output
run: $MAVEN clean -pl '!:trino-server,!:trino-cli'
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
with:
platforms: arm64,ppc64le
- name: Build and Test Docker Image
Expand Down Expand Up @@ -200,23 +201,9 @@ jobs:
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
# Skip checks, these are run in `maven-checks` job and e.g. checkstyle is expensive.
$MAVEN ${MAVEN_TEST} -T 1C clean verify -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
$MAVEN ${MAVEN_TEST} -T 1C clean compile test-compile -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -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@v4
with:
fetch-depth: 0 # checkout all commits: it's not needed here, but it's needed almost always, so let's do this for completeness
ref: |
${{ github.event_name == 'repository_dispatch' &&
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
- name: Web UI Checks
run: core/trino-main/bin/check_webui.sh

test-jdbc-compatibility:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -355,6 +342,7 @@ jobs:
!:trino-docs,
!:trino-druid,
!:trino-elasticsearch,
!:trino-exasol,
!:trino-faulttolerant-tests,
!:trino-filesystem,
!:trino-filesystem-azure,
Expand Down Expand Up @@ -466,6 +454,7 @@ jobs:
- { modules: plugin/trino-delta-lake, profile: fte-tests }
- { modules: plugin/trino-druid }
- { modules: plugin/trino-elasticsearch }
- { modules: plugin/trino-exasol }
- { modules: plugin/trino-google-sheets }
- { modules: plugin/trino-hive }
- { modules: plugin/trino-hive, profile: fte-tests }
Expand All @@ -481,6 +470,7 @@ jobs:
- { modules: plugin/trino-mariadb }
- { modules: plugin/trino-mongodb }
- { modules: plugin/trino-mysql }
- { modules: plugin/trino-openlineage }
- { modules: plugin/trino-opensearch }
- { modules: plugin/trino-oracle }
- { modules: plugin/trino-phoenix5 }
Expand All @@ -495,7 +485,7 @@ jobs:
- { modules: plugin/trino-singlestore }
- { modules: plugin/trino-snowflake }
- { modules: plugin/trino-snowflake, profile: cloud-tests }
- { modules: plugin/trino-sqlserver }
- { modules: plugin/trino-sqlserver, runson: ubuntu-20.04 }
- { modules: testing/trino-faulttolerant-tests, profile: default }
- { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-delta }
- { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-hive }
Expand All @@ -507,7 +497,7 @@ jobs:
echo "matrix=$(jq -c '.' matrix.json)" >> $GITHUB_OUTPUT
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.runson || 'ubuntu-latest' }}
needs: build-test-matrix
if: needs.build-test-matrix.outputs.matrix != '{}'
strategy:
Expand All @@ -526,8 +516,8 @@ jobs:
timeout-minutes: 10
with:
cache: restore
cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore') }}
java-version: ${{ matrix.jdk != '' && matrix.jdk || '22' }}
cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore' || matrix.modules == 'plugin/trino-exasol') }}
java-version: ${{ matrix.jdk != '' && matrix.jdk || '23' }}
- name: Maven Install
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
Expand Down Expand Up @@ -650,11 +640,15 @@ jobs:
env:
BIGQUERY_CREDENTIALS_KEY: ${{ secrets.BIGQUERY_CREDENTIALS_KEY }}
GCP_STORAGE_BUCKET: ${{ vars.GCP_STORAGE_BUCKET }}
BIGQUERY_TESTING_PROJECT_ID: ${{ vars.BIGQUERY_TESTING_PROJECT_ID }}
BIGQUERY_TESTING_PARENT_PROJECT_ID: ${{ vars.BIGQUERY_TESTING_PARENT_PROJECT_ID }}
if: matrix.modules == 'plugin/trino-bigquery' && !contains(matrix.profile, 'cloud-tests-2') && (env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || env.BIGQUERY_CREDENTIALS_KEY != '')
run: |
$MAVEN test ${MAVEN_TEST} -pl :trino-bigquery -Pcloud-tests-1 \
-Dbigquery.credentials-key="${BIGQUERY_CREDENTIALS_KEY}" \
-Dtesting.gcp-storage-bucket="${GCP_STORAGE_BUCKET}"
-Dtesting.gcp-storage-bucket="${GCP_STORAGE_BUCKET}" \
-Dtesting.bigquery-project-id="${BIGQUERY_TESTING_PROJECT_ID}" \
-Dtesting.bigquery-parent-project-id="${BIGQUERY_TESTING_PARENT_PROJECT_ID}"
- name: Cloud BigQuery Smoke Tests
id: tests-bq-smoke
env:
Expand Down Expand Up @@ -831,7 +825,7 @@ jobs:
with:
cache: restore
cleanup-node: true
- uses: dorny/paths-filter@v3
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
filters: |
Expand Down Expand Up @@ -880,7 +874,6 @@ jobs:
# suite-4 does not exist
- suite-5
- suite-6-non-generic
- suite-7-non-generic
- suite-hive-transactional
- suite-azure
- suite-delta-lake-databricks91
Expand Down Expand Up @@ -960,6 +953,10 @@ jobs:
# 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
# Workaround for https://github.com/microsoft/mssql-docker/issues/899
- config: default
suite: suite-7-non-generic
runson: ubuntu-20.04
EOF
- name: Build PT matrix (all)
if: |
Expand Down Expand Up @@ -1014,7 +1011,7 @@ jobs:
echo "matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT
pt:
runs-on: ubuntu-latest
runs-on: ${{ matrix.runson || '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 }})
if: needs.build-pt.outputs.matrix != '{}'
Expand Down Expand Up @@ -1052,6 +1049,7 @@ jobs:
!contains(github.event.pull_request.labels.*.name, 'tests:all-product')
run: echo "PTL_OPTS=--impacted-features impacted-features.log" >> $GITHUB_ENV
- name: Product Tests
id: tests
env:
ABFS_CONTAINER: ${{ vars.AZURE_ABFS_HIERARCHICAL_CONTAINER }}
ABFS_ACCOUNT: ${{ vars.AZURE_ABFS_HIERARCHICAL_ACCOUNT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 5
steps:
- name: 'Cancel Runs For Closed PRs'
uses: styfle/[email protected]
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
# Cancel workflow when PR closed. https://github.com/styfle/cancel-workflow-action#advanced-ignore-sha
ignore_sha: true
Expand Down
Loading

0 comments on commit 54eb677

Please sign in to comment.