Skip to content

Commit

Permalink
Update oracle test version
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjian2664 committed Dec 24, 2024
1 parent 4dd2d29 commit 3dab010
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 316 deletions.
285 changes: 1 addition & 284 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,44 +50,6 @@ concurrency:
cancel-in-progress: true

jobs:
maven-checks:
runs-on: ubuntu-latest
name: maven-checks ${{ matrix.java-version }}
strategy:
fail-fast: false
matrix:
include:
- { java-version: 23, cache: 'true', cleanup-node: true }
- { java-version: 24-ea, cache: 'restore', cleanup-node: true }
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent
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) || '' }}
- uses: ./.github/actions/setup
timeout-minutes: 10
with:
cache: ${{ matrix.cache }}
java-version: ${{ matrix.java-version }}
cleanup-node: true
- name: Check SPI backward compatibility
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean install ${MAVEN_FAST_INSTALL} -pl :trino-spi -am
$MAVEN clean verify -B --strict-checksums -DskipTests -pl :trino-spi
- name: Maven Checks
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean verify -B --strict-checksums -V -T 1C -DskipTests -P ci -pl '!:trino-server-rpm'
- name: Remove Trino from local Maven repo to avoid caching it
# Avoid caching artifacts built in this job, cache should only include dependencies
if: steps.cache.outputs.cache-hit != 'true' && matrix.cache == 'true'
run: rm -rf ~/.m2/repository/io/trino/trino-*

artifact-checks:
runs-on: ubuntu-latest
timeout-minutes: 45
Expand Down Expand Up @@ -177,72 +139,6 @@ jobs:
with:
base_ref: ${{ github.event.pull_request.base.ref }}

error-prone-checks:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
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) || '' }}
- uses: ./.github/actions/setup
timeout-minutes: 10
with:
cache: restore
- name: Maven Install
run: |
# build everything to make sure dependencies of impacted modules are present
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm'
- name: Error Prone Checks
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 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'
test-jdbc-compatibility:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout tags so version in Manifest is set properly
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) || '' }}
- uses: ./.github/actions/setup
timeout-minutes: 10
with:
cache: restore
- name: Maven Install
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -Dgib.logImpactedTo=gib-impacted.log -pl '!:trino-docs,!:trino-server,!:trino-server-rpm'
- name: Test old JDBC vs current server
id: tests-old
run: |
if [ ! -f gib-impacted.log ] || grep -q testing/trino-test-jdbc-compatibility-old-driver gib-impacted.log; then
testing/trino-test-jdbc-compatibility-old-driver/bin/run_tests.sh
fi
- name: Test current JDBC vs old server
id: tests-current
if: always()
run: |
if [ ! -f gib-impacted.log ] || grep -q testing/trino-test-jdbc-compatibility-old-server gib-impacted.log; then
$MAVEN test ${MAVEN_TEST} -pl :trino-test-jdbc-compatibility-old-server
fi
- name: Upload test results
uses: ./.github/actions/process-test-results
if: always()
with:
has-failed-tests: ${{ steps.tests-old.outcome == 'failure' || steps.tests-current.outcome == 'failure' }}
upload-heap-dump: ${{ env.SECRETS_PRESENT == '' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}

hive-tests:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -309,87 +205,6 @@ jobs:
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

test-other-modules:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB
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) || '' }}
- uses: ./.github/actions/setup
timeout-minutes: 10
with:
cache: restore
cleanup-node: true
- name: Maven Install
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm'
- name: Maven Tests
id: tests
run: |
$MAVEN test ${MAVEN_TEST} -pl '
!:trino-base-jdbc,
!:trino-bigquery,
!:trino-cassandra,
!:trino-clickhouse,
!:trino-delta-lake,
!:trino-docs,
!:trino-druid,
!:trino-elasticsearch,
!:trino-exasol,
!:trino-faulttolerant-tests,
!:trino-filesystem,
!:trino-filesystem-alluxio,
!:trino-filesystem-cache-alluxio,
!:trino-filesystem-azure,
!:trino-filesystem-gcs,
!:trino-filesystem-manager,
!:trino-filesystem-s3,
!:trino-google-sheets,
!:trino-hdfs,
!:trino-hive,
!:trino-hudi,
!:trino-iceberg,
!:trino-ignite,
!:trino-jdbc,
!:trino-kafka,
!:trino-kudu,
!:trino-main,
!:trino-mariadb,
!:trino-memory,
!:trino-mongodb,
!:trino-mysql,
!:trino-opensearch,
!:trino-oracle,
!:trino-orc,
!:trino-parquet,
!:trino-phoenix5,
!:trino-pinot,
!:trino-postgresql,
!:trino-redis,
!:trino-redshift,
!:trino-resource-group-managers,
!:trino-server,
!:trino-server-rpm,
!:trino-singlestore,
!:trino-snowflake,
!:trino-sqlserver,
!:trino-test-jdbc-compatibility-old-server,
!:trino-tests,
!:trino-thrift,
!:trino-vertica'
- name: Upload test results
uses: ./.github/actions/process-test-results
if: always()
with:
has-failed-tests: ${{ steps.tests.outcome == 'failure' }}
upload-heap-dump: ${{ env.SECRETS_PRESENT == '' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}

build-test-matrix:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -431,69 +246,7 @@ jobs:
- plugin/trino-base-jdbc
- plugin/trino-memory
- plugin/trino-thrift
- modules:
- lib/trino-orc
- lib/trino-parquet
- modules:
- lib/trino-filesystem
- lib/trino-filesystem-azure
- lib/trino-filesystem-alluxio
- lib/trino-filesystem-cache-alluxio
- lib/trino-filesystem-gcs
- lib/trino-filesystem-manager
- lib/trino-filesystem-s3
- lib/trino-hdfs
- { modules: core/trino-main }
- { modules: lib/trino-filesystem-azure, profile: cloud-tests }
- { modules: lib/trino-filesystem-gcs, profile: cloud-tests }
- { modules: lib/trino-filesystem-s3, profile: cloud-tests }
- { modules: lib/trino-hdfs, profile: cloud-tests }
- { modules: plugin/trino-bigquery }
- { modules: plugin/trino-bigquery, profile: cloud-tests-2 }
- { modules: plugin/trino-cassandra }
- { modules: plugin/trino-clickhouse }
- { modules: plugin/trino-delta-lake }
- { modules: plugin/trino-delta-lake, profile: cloud-tests }
- { 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 }
- { modules: plugin/trino-hive, profile: test-parquet }
- { modules: plugin/trino-hudi }
- { modules: plugin/trino-iceberg }
- { modules: plugin/trino-iceberg, profile: cloud-tests }
- { modules: plugin/trino-iceberg, profile: fte-tests }
- { modules: plugin/trino-iceberg, profile: minio-and-avro }
- { modules: plugin/trino-ignite }
- { modules: plugin/trino-kafka }
- { modules: plugin/trino-kudu }
- { 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 }
- { modules: plugin/trino-pinot }
- { modules: plugin/trino-postgresql }
- { modules: plugin/trino-redis }
- { modules: plugin/trino-redshift }
- { modules: plugin/trino-redshift, profile: cloud-tests }
- { modules: plugin/trino-redshift, profile: fte-tests }
- { modules: plugin/trino-resource-group-managers }
- { modules: plugin/trino-singlestore }
- { modules: plugin/trino-snowflake }
- { modules: plugin/trino-snowflake, profile: cloud-tests }
- { modules: plugin/trino-sqlserver }
- { modules: plugin/trino-vertica }
- { 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 }
- { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-iceberg }
- { modules: testing/trino-tests }
- { modules: [plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle, plugin/trino-oracle] }
EOF
./.github/bin/build-matrix-from-impacted.py -v -i gib-impacted.log -m .github/test-matrix.yaml -o matrix.json
echo "Matrix: $(jq '.' matrix.json)"
Expand Down Expand Up @@ -870,42 +623,6 @@ jobs:
- default
suite:
- suite-1
- suite-2
- suite-3
# suite-4 does not exist
- suite-5
- suite-6-non-generic
- suite-7-non-generic
- suite-hive-transactional
- suite-azure
- suite-delta-lake-databricks104
- suite-delta-lake-databricks113
- suite-delta-lake-databricks122
- suite-delta-lake-databricks133
- suite-delta-lake-databricks143
- suite-delta-lake-databricks154
- suite-databricks-unity-http-hms
- suite-ranger
- suite-gcs
- suite-clients
- suite-functions
- suite-tpch
- suite-tpcds
- suite-storage-formats-detailed
- suite-parquet
- suite-oauth2
- suite-ldap
- suite-compatibility
- suite-all-connectors-smoke
- suite-delta-lake-oss
- suite-kafka
- suite-cassandra
- suite-clickhouse
- suite-mysql
- suite-iceberg
- suite-snowflake
- suite-hudi
- suite-ignite
exclude:
- suite: suite-azure
ignore exclusion if: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1909,8 +1909,7 @@ public void testConstantUpdateWithVarcharGreaterAndLowerPredicate()
public void testDeleteWithBigintEqualityPredicate()
{
skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE));
// TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated
try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_bigint", "AS SELECT * FROM region")) {
try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_with_bigint_equality_predicate", "AS SELECT * FROM region")) {
assertUpdate("DELETE FROM " + table.getName() + " WHERE regionkey = 1", 1);
assertQuery(
"SELECT regionkey, name FROM " + table.getName(),
Expand All @@ -1926,8 +1925,7 @@ public void testDeleteWithBigintEqualityPredicate()
public void testDeleteWithVarcharEqualityPredicate()
{
skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE));
// TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated
try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_varchar", "(col varchar(1))", ImmutableList.of("'a'", "'A'", "null"))) {
try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_varchar_equality_predicate", "(col varchar(1))", ImmutableList.of("'a'", "'A'", "null"))) {
if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_EQUALITY)) {
assertQueryFails("DELETE FROM " + table.getName() + " WHERE col = 'A'", MODIFYING_ROWS_MESSAGE);
return;
Expand All @@ -1942,8 +1940,7 @@ public void testDeleteWithVarcharEqualityPredicate()
public void testDeleteWithVarcharInequalityPredicate()
{
skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE));
// TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated
try (TestTable table = createTestTableForWrites("test_delete_varchar", "(col varchar(1), pk int)", ImmutableList.of("'a', 0", "'A', 1", "null, 2"), "pk")) {
try (TestTable table = createTestTableForWrites("test_delete_with_varchar_inequality", "(col varchar(1), pk int)", ImmutableList.of("'a', 0", "'A', 1", "null, 2"), "pk")) {
if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_INEQUALITY) && !hasBehavior(SUPPORTS_MERGE)) {
assertQueryFails("DELETE FROM " + table.getName() + " WHERE col != 'A'", MODIFYING_ROWS_MESSAGE);
return;
Expand All @@ -1958,8 +1955,7 @@ public void testDeleteWithVarcharInequalityPredicate()
public void testDeleteWithVarcharGreaterAndLowerPredicate()
{
skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE));
// TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated
try (TestTable table = createTestTableForWrites("test_delete_varchar", "(col varchar(1), pk int)", ImmutableList.of("'0', 0", "'a', 1", "'A', 2", "'b', 3", "null, 4"), "pk")) {
try (TestTable table = createTestTableForWrites("test_delete_varchar_greater_lower_predicate", "(col varchar(1), pk int)", ImmutableList.of("'0', 0", "'a', 1", "'A', 2", "'b', 3", "null, 4"), "pk")) {
if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_INEQUALITY) && !hasBehavior(SUPPORTS_MERGE)) {
assertQueryFails("DELETE FROM " + table.getName() + " WHERE col < 'A'", MODIFYING_ROWS_MESSAGE);
assertQueryFails("DELETE FROM " + table.getName() + " WHERE col > 'A'", MODIFYING_ROWS_MESSAGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ protected void verifyConcurrentAddColumnFailurePermissible(Exception e)
@Override
protected OptionalInt maxSchemaNameLength()
{
return OptionalInt.of(30);
return OptionalInt.of(128);
}

@Override
Expand All @@ -458,7 +458,7 @@ protected void verifySchemaNameLengthFailurePermissible(Throwable e)
@Override
protected OptionalInt maxTableNameLength()
{
return OptionalInt.of(30);
return OptionalInt.of(128);
}

@Override
Expand All @@ -470,7 +470,7 @@ protected void verifyTableNameLengthFailurePermissible(Throwable e)
@Override
protected OptionalInt maxColumnNameLength()
{
return OptionalInt.of(30);
return OptionalInt.of(128);
}

@Override
Expand Down
Loading

0 comments on commit 3dab010

Please sign in to comment.