Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/permission-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,36 @@ jobs:
name: yugabytedb_2_permission_integration_test_reports
path: core/build/reports/tests/integrationTestJdbcPermission

integration-test-permission-jdbc-yugabytedb-2025:
name: YugabyteDB 2025 Permission Integration Test
runs-on: ubuntu-latest

steps:
- name: Run YugabyteDB 2025
run: |
docker run -p 5433:5433 -e YSQL_USER=yugabyte -e YSQL_PASSWORD=yugabyte -d yugabytedb/yugabyte:2025.1.0.1-b3 bin/yugabyted start --background=false --master_flag="ysql_enable_db_catalog_version_mode=false" --tserver_flags="ysql_enable_db_catalog_version_mode=false"

- uses: actions/checkout@v6

- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_VENDOR }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5

- name: Execute Gradle 'integrationTestJdbcPermission' task
run: ./gradlew integrationTestJdbcPermission -Dscalardb.jdbc.url=jdbc:yugabytedb://localhost:5433/yugabyte?load-balance=any -Dscalardb.jdbc.username=yugabyte -Dscalardb.jdbc.password=yugabyte -Dscalar.db.jdbc.connection_pool.max_total=12 -Dscalar.db.jdbc.table_metadata.connection_pool.max_total=4 -Dscalar.db.jdbc.admin.connection_pool.max_total=4

- name: Upload Gradle test reports
if: always()
uses: actions/upload-artifact@v6
with:
name: yugabytedb_2025_permission_integration_test_reports
path: core/build/reports/tests/integrationTestJdbcPermission

integration-test-permission-jdbc-db2-11-5:
name: Db2 11.5 Permission Integration Test
runs-on: ubuntu-latest
Expand Down
13 changes: 10 additions & 3 deletions ci/tests-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,16 @@ jdbc:
done
./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mysql://localhost:4000 -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=

- label: yugabytedb
display_name: YugabyteDB 2
setup: "docker run -p 5433:5433 -e YSQL_USER=yugabyte -e YSQL_PASSWORD=yugabyte -d yugabytedb/yugabyte:2.20.4.0-b50 bin/yugabyted start --background=false --master_flag=\"ysql_enable_db_catalog_version_mode=false\" --tserver_flags=\"ysql_enable_db_catalog_version_mode=false\""
- label: yugabytedb_%VERSION%
display_name: YugabyteDB %VERSION%
versions:
# YugabyteDB manages a global schema catalog version. A session using a stale version fails.
# Our integration tests address this limitation with some workarounds.
# However, version 2024.x is more sensitive to the schema catalog version mismatch, so we skip it.
# Since the YugabyteDB team aims to remove this limitation in 2025.x, the integration tests pass with that version.
- 2.20.4.0-b50
- 2025.1.0.1-b3
setup: "docker run -p 5433:5433 -e YSQL_USER=yugabyte -e YSQL_PASSWORD=yugabyte -d yugabytedb/yugabyte:%VERSION% bin/yugabyted start --background=false --master_flag=\"ysql_enable_db_catalog_version_mode=false\" --tserver_flags=\"ysql_enable_db_catalog_version_mode=false\""
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:yugabytedb://localhost:5433/?load-balance=any -Dscalardb.jdbc.username=yugabyte -Dscalardb.jdbc.password=yugabyte -Dscalar.db.jdbc.connection_pool.max_total=12 -Dscalar.db.jdbc.table_metadata.connection_pool.max_total=4 -Dscalar.db.jdbc.admin.connection_pool.max_total=4
Comment on lines +216 to 226
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description is still the default template/WIP and doesn't explain the motivation, scope, or how to validate these CI changes. Please update the PR description (especially the 'Description', 'Changes made', and testing/validation notes) so reviewers can assess the impact of adding YugabyteDB 2025 coverage.

Copilot uses AI. Check for mistakes.

multi-storage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected Properties getProperties(String testName) {

@Override
protected int getThreadNum() {
if (JdbcTestUtils.isOracle(rdbEngine)) {
if (JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The condition JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine) is also used in JdbcDatabaseMultipleClusteringKeyScanIntegrationTest. To avoid code duplication and improve maintainability, consider adding a new helper method in JdbcTestUtils, for example isSingleThreadedForTest(), and use it in both places.

Example in JdbcTestUtils:

public static boolean isSingleThreadedForTest(RdbEngineStrategy rdbEngine) {
    return isOracle(rdbEngine) || isYugabyte(rdbEngine);
}

Then you can simplify this to:

if (JdbcTestUtils.isSingleThreadedForTest(rdbEngine)) {

return 1;
}
return super.getThreadNum();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected Properties getProperties(String testName) {

@Override
protected int getThreadNum() {
if (JdbcTestUtils.isOracle(rdbEngine)) {
if (JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This condition is duplicated in JdbcDatabaseCrossPartitionScanIntegrationTest. To improve maintainability, consider creating a shared helper method in JdbcTestUtils to encapsulate this logic. For example:

// in JdbcTestUtils.java
public static boolean isSingleThreadedForTest(RdbEngineStrategy rdbEngine) {
    return isOracle(rdbEngine) || isYugabyte(rdbEngine);
}

This would allow you to simplify the condition here and in the other test class.

return 1;
}
return super.getThreadNum();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,8 @@ public static boolean isSqlite() {
public static boolean isDb2() {
return System.getProperty(PROP_JDBC_URL, DEFAULT_JDBC_URL).startsWith("jdbc:db2:");
}

public static boolean isYugabyte() {
return System.getProperty(PROP_JDBC_URL, DEFAULT_JDBC_URL).startsWith("jdbc:yugabytedb:");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public abstract class DistributedStorageCrossPartitionScanIntegrationTestBase {

@BeforeAll
public void beforeAll() throws Exception {
executorService = Executors.newFixedThreadPool(getThreadNum());
StorageFactory factory = StorageFactory.create(getProperties(TEST_NAME));
executorService = Executors.newFixedThreadPool(getThreadNum());
admin = factory.getStorageAdmin();
storage = factory.getStorage();
namespaceBaseName = getNamespaceBaseName();
Expand Down
Loading