Skip to content

Commit b8081f0

Browse files
authored
Merge branch 'master' into feat/data-loader/cli-param-help
2 parents 6e3d454 + da9f323 commit b8081f0

File tree

50 files changed

+1866
-1735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1866
-1735
lines changed

.github/workflows/ci.yaml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ jobs:
138138
- 9042:9042
139139

140140
strategy:
141+
fail-fast: false
141142
matrix:
142143
mode:
143144
- label: default
@@ -202,6 +203,7 @@ jobs:
202203
- 9042:9042
203204

204205
strategy:
206+
fail-fast: false
205207
matrix:
206208
mode:
207209
- label: default
@@ -262,6 +264,7 @@ jobs:
262264
SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ ((inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11') && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle') && 'true' || 'false' }}"
263265

264266
strategy:
267+
fail-fast: false
265268
matrix:
266269
mode:
267270
- label: default
@@ -361,6 +364,7 @@ jobs:
361364
- 8000:8000
362365

363366
strategy:
367+
fail-fast: false
364368
matrix:
365369
mode:
366370
- label: default
@@ -416,6 +420,7 @@ jobs:
416420
runs-on: ubuntu-latest
417421

418422
strategy:
423+
fail-fast: false
419424
matrix:
420425
mode:
421426
- label: default
@@ -475,6 +480,7 @@ jobs:
475480
runs-on: ubuntu-latest
476481

477482
strategy:
483+
fail-fast: false
478484
matrix:
479485
mode:
480486
- label: default
@@ -534,6 +540,7 @@ jobs:
534540
runs-on: ubuntu-latest
535541

536542
strategy:
543+
fail-fast: false
537544
matrix:
538545
mode:
539546
- label: default
@@ -602,6 +609,7 @@ jobs:
602609
- 5432:5432
603610

604611
strategy:
612+
fail-fast: false
605613
matrix:
606614
mode:
607615
- label: default
@@ -666,6 +674,7 @@ jobs:
666674
- 5432:5432
667675

668676
strategy:
677+
fail-fast: false
669678
matrix:
670679
mode:
671680
- label: default
@@ -730,6 +739,7 @@ jobs:
730739
- 5432:5432
731740

732741
strategy:
742+
fail-fast: false
733743
matrix:
734744
mode:
735745
- label: default
@@ -794,6 +804,7 @@ jobs:
794804
- 5432:5432
795805

796806
strategy:
807+
fail-fast: false
797808
matrix:
798809
mode:
799810
- label: default
@@ -858,6 +869,7 @@ jobs:
858869
- 5432:5432
859870

860871
strategy:
872+
fail-fast: false
861873
matrix:
862874
mode:
863875
- label: default
@@ -922,6 +934,7 @@ jobs:
922934
- 1521:1521
923935

924936
strategy:
937+
fail-fast: false
925938
matrix:
926939
mode:
927940
- label: default
@@ -993,6 +1006,7 @@ jobs:
9931006
--health-retries 120
9941007
9951008
strategy:
1009+
fail-fast: false
9961010
matrix:
9971011
mode:
9981012
- label: default
@@ -1048,6 +1062,7 @@ jobs:
10481062
runs-on: ubuntu-latest
10491063

10501064
strategy:
1065+
fail-fast: false
10511066
matrix:
10521067
mode:
10531068
- label: default
@@ -1141,6 +1156,7 @@ jobs:
11411156
SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ ((inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11') && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle') && 'true' || 'false' }}"
11421157

11431158
strategy:
1159+
fail-fast: false
11441160
matrix:
11451161
mode:
11461162
- label: default
@@ -1228,6 +1244,7 @@ jobs:
12281244
options: --name sqlserver19
12291245

12301246
strategy:
1247+
fail-fast: false
12311248
matrix:
12321249
mode:
12331250
- label: default
@@ -1298,6 +1315,7 @@ jobs:
12981315
options: --name sqlserver22
12991316

13001317
strategy:
1318+
fail-fast: false
13011319
matrix:
13021320
mode:
13031321
- label: default
@@ -1357,6 +1375,7 @@ jobs:
13571375
runs-on: ubuntu-latest
13581376

13591377
strategy:
1378+
fail-fast: false
13601379
matrix:
13611380
mode:
13621381
- label: default
@@ -1415,6 +1434,7 @@ jobs:
14151434
runs-on: ubuntu-latest
14161435

14171436
strategy:
1437+
fail-fast: false
14181438
matrix:
14191439
mode:
14201440
- label: default
@@ -1474,6 +1494,7 @@ jobs:
14741494
runs-on: ubuntu-latest
14751495

14761496
strategy:
1497+
fail-fast: false
14771498
matrix:
14781499
mode:
14791500
- label: default
@@ -1533,6 +1554,7 @@ jobs:
15331554
runs-on: ubuntu-latest
15341555

15351556
strategy:
1557+
fail-fast: false
15361558
matrix:
15371559
mode:
15381560
- label: default
@@ -1604,6 +1626,7 @@ jobs:
16041626
options: --privileged --name db2
16051627

16061628
strategy:
1629+
fail-fast: false
16071630
matrix:
16081631
mode:
16091632
- label: default
@@ -1681,6 +1704,7 @@ jobs:
16811704
options: --privileged --name db2
16821705

16831706
strategy:
1707+
fail-fast: false
16841708
matrix:
16851709
mode:
16861710
- label: default
@@ -1741,6 +1765,138 @@ jobs:
17411765
name: db2_12.1_integration_test_reports_${{ matrix.mode.label }}
17421766
path: core/build/reports/tests/integrationTestJdbc
17431767

1768+
integration-test-for-alloydb-15:
1769+
name: AlloyDB 15 integration test (${{ matrix.mode.label }})
1770+
runs-on: ubuntu-latest
1771+
1772+
services:
1773+
alloydb:
1774+
image: google/alloydbomni:15
1775+
env:
1776+
POSTGRES_USER: postgres
1777+
POSTGRES_PASSWORD: postgres
1778+
POSTGRES_INITDB_ARGS: "--icu-locale=en-US-u-va-posix"
1779+
ports:
1780+
- 5432:5432
1781+
1782+
strategy:
1783+
fail-fast: false
1784+
matrix:
1785+
mode:
1786+
- label: default
1787+
group_commit_enabled: false
1788+
- label: with_group_commit
1789+
group_commit_enabled: true
1790+
1791+
steps:
1792+
- uses: actions/checkout@v4
1793+
1794+
- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
1795+
uses: actions/setup-java@v4
1796+
with:
1797+
java-version: ${{ env.JAVA_VERSION }}
1798+
distribution: ${{ env.JAVA_VENDOR }}
1799+
1800+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
1801+
uses: actions/setup-java@v4
1802+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}}
1803+
with:
1804+
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
1805+
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}
1806+
1807+
- name: Login to Oracle container registry
1808+
uses: docker/login-action@v3
1809+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1810+
with:
1811+
registry: container-registry.oracle.com
1812+
username: ${{ secrets.OCR_USERNAME }}
1813+
password: ${{ secrets.OCR_TOKEN }}
1814+
1815+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test
1816+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1817+
run: |
1818+
container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}")
1819+
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
1820+
1821+
- name: Setup Gradle
1822+
uses: gradle/actions/setup-gradle@v4
1823+
1824+
- name: Execute Gradle 'integrationTestJdbc' task
1825+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
1826+
1827+
- name: Upload Gradle test reports
1828+
if: always()
1829+
uses: actions/upload-artifact@v4
1830+
with:
1831+
name: alloydb_15_integration_test_reports_${{ matrix.mode.label }}
1832+
path: core/build/reports/tests/integrationTestJdbc
1833+
1834+
integration-test-for-alloydb-16:
1835+
name: AlloyDB 16 integration test (${{ matrix.mode.label }})
1836+
runs-on: ubuntu-latest
1837+
1838+
services:
1839+
alloydb:
1840+
image: google/alloydbomni:16
1841+
env:
1842+
POSTGRES_USER: postgres
1843+
POSTGRES_PASSWORD: postgres
1844+
POSTGRES_INITDB_ARGS: "--icu-locale=en-US-u-va-posix"
1845+
ports:
1846+
- 5432:5432
1847+
1848+
strategy:
1849+
fail-fast: false
1850+
matrix:
1851+
mode:
1852+
- label: default
1853+
group_commit_enabled: false
1854+
- label: with_group_commit
1855+
group_commit_enabled: true
1856+
1857+
steps:
1858+
- uses: actions/checkout@v4
1859+
1860+
- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
1861+
uses: actions/setup-java@v4
1862+
with:
1863+
java-version: ${{ env.JAVA_VERSION }}
1864+
distribution: ${{ env.JAVA_VENDOR }}
1865+
1866+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
1867+
uses: actions/setup-java@v4
1868+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}}
1869+
with:
1870+
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
1871+
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}
1872+
1873+
- name: Login to Oracle container registry
1874+
uses: docker/login-action@v3
1875+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1876+
with:
1877+
registry: container-registry.oracle.com
1878+
username: ${{ secrets.OCR_USERNAME }}
1879+
password: ${{ secrets.OCR_TOKEN }}
1880+
1881+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test
1882+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1883+
run: |
1884+
container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}")
1885+
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
1886+
1887+
- name: Setup Gradle
1888+
uses: gradle/actions/setup-gradle@v4
1889+
1890+
- name: Execute Gradle 'integrationTestJdbc' task
1891+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
1892+
1893+
- name: Upload Gradle test reports
1894+
if: always()
1895+
uses: actions/upload-artifact@v4
1896+
with:
1897+
name: alloydb_16_integration_test_reports_${{ matrix.mode.label }}
1898+
path: core/build/reports/tests/integrationTestJdbc
1899+
17441900
integration-test-for-multi-storage:
17451901
name: Multi-storage integration test (${{ matrix.mode.label }})
17461902
runs-on: ubuntu-latest
@@ -1763,6 +1919,7 @@ jobs:
17631919
- 9042:9042
17641920

17651921
strategy:
1922+
fail-fast: false
17661923
matrix:
17671924
mode:
17681925
- label: default

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ subprojects {
3939
yugabyteDriverVersion = '42.7.3-yb-4'
4040
db2DriverVersion = '12.1.2.0'
4141
mariadDbDriverVersion = '3.5.6'
42+
alloyDbJdbcConnectorVersion = '1.2.6'
4243
picocliVersion = '4.7.7'
4344
commonsTextVersion = '1.14.0'
4445
junitVersion = '5.14.0'

core/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ dependencies {
173173
implementation ("org.mariadb.jdbc:mariadb-java-client:${mariadDbDriverVersion}") {
174174
exclude group: 'org.slf4j', module: 'slf4j-api'
175175
}
176+
// The Java connector library used to establish simply a secure connection to AlloyDB on GCP
177+
implementation("com.google.cloud:alloydb-jdbc-connector:${alloyDbJdbcConnectorVersion}")
176178
implementation "org.apache.commons:commons-text:${commonsTextVersion}"
177179
testImplementation platform("org.junit:junit-bom:${junitVersion}")
178180
testImplementation 'org.junit.jupiter:junit-jupiter'

core/src/integration-test/java/com/scalar/db/storage/cassandra/CassandraEnv.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public static Properties getProperties(String testName) {
3737
DatabaseConfig.SYSTEM_NAMESPACE_NAME,
3838
DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME + "_" + testName);
3939

40+
// Metadata cache expiration time
41+
properties.setProperty(DatabaseConfig.METADATA_CACHE_EXPIRATION_TIME_SECS, "1");
42+
4043
return properties;
4144
}
4245

core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosEnv.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public static Properties getProperties(String testName) {
3232
DatabaseConfig.SYSTEM_NAMESPACE_NAME,
3333
DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME + "_" + testName);
3434

35+
// Metadata cache expiration time
36+
properties.setProperty(DatabaseConfig.METADATA_CACHE_EXPIRATION_TIME_SECS, "1");
37+
3538
return properties;
3639
}
3740

core/src/integration-test/java/com/scalar/db/storage/dynamo/DynamoEnv.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public static Properties getProperties(String testName) {
5252
DatabaseConfig.SYSTEM_NAMESPACE_NAME,
5353
DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME + "_" + testName);
5454

55+
// Metadata cache expiration time
56+
properties.setProperty(DatabaseConfig.METADATA_CACHE_EXPIRATION_TIME_SECS, "1");
57+
5558
return properties;
5659
}
5760

0 commit comments

Comments
 (0)