From cb170fdf3fbfbeaec04b5dc848f27b134eb9df76 Mon Sep 17 00:00:00 2001 From: Vincent Guilpain Date: Thu, 17 Apr 2025 10:18:44 +0900 Subject: [PATCH 1/3] Fix --- .github/workflows/ci.yaml | 61 +++++++++++-------- .../create-no-superuser-sqlserver.sh | 43 +++++++------ ...CommitNullMetadataIntegrationTestBase.java | 4 +- ...nsusCommitSpecificIntegrationTestBase.java | 4 +- ...nsusCommitSpecificIntegrationTestBase.java | 4 +- 5 files changed, 66 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2076aec5e1..c442607646 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1120,18 +1120,11 @@ jobs: integration-test-for-jdbc-sqlserver-2017: name: SQL Server 2017 integration test (${{ matrix.mode.label }}) - runs-on: ubuntu-20.04 - - services: - sqlserver: - image: mcr.microsoft.com/mssql/server:2017-latest - env: - MSSQL_PID: "Express" - SA_PASSWORD: "SqlServer17" - ACCEPT_EULA: "Y" - ports: - - 1433:1433 - options: --name sqlserver17 + runs-on: windows-latest + env: + # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false} + SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}" + SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}" strategy: matrix: @@ -1144,6 +1137,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup Sql Server 2017 + uses: rails-sqlserver/setup-mssql@v1 + with: + components: sqlcmd,sqlengine + sa-password: "SqlServer17" + version: 2017 + - name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }}) uses: actions/setup-java@v4 with: @@ -1152,34 +1152,45 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to Oracle container registry + - name: Login to GitHub Container Registry uses: docker/login-action@v3 - if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} with: - registry: container-registry.oracle.com - username: ${{ secrets.OCR_USERNAME }} - password: ${{ secrets.OCR_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CR_PAT }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} run: | - container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") - docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" + $container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-windows") + docker cp "${container_id}:oracle-jdk.exe" . + docker rm "$container_id" + Write-Host "Install Oracle JDK" + Start-Process "oracle-jdk.exe" -NoNewWindow -Wait -ArgumentList "/s" + Write-Host "Oracle JDK installation successful" + if ( ${env:INT_TEST_JAVA_RUNTIME_VERSION} -eq '8' ) { + $jdk_root_dir = "jdk-1.8" + } else { + $jdk_root_dir = "jdk-11" + } + echo "JAVA_HOME=C:\Program Files\Java\${jdk_root_dir}" >> ${env:GITHUB_ENV} - name: Create no superuser - run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver17 SqlServer17 10 3 + run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer17 10 3 + shell: bash timeout-minutes: 1 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Execute Gradle 'integrationTestJdbc' task - run: ./gradlew integrationTestJdbc "-Dscalardb.jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=test_db;encrypt=true;trustServerCertificate=true" -Dscalardb.jdbc.username=no_superuser -Dscalardb.jdbc.password=no_superuser_password ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }} + run: ./gradlew.bat integrationTestJdbc "-Dscalardb.jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=test_db;encrypt=true;trustServerCertificate=true" "-Dfile.encoding=UTF-8" "-Dscalardb.jdbc.username=no_superuser" "-Dscalardb.jdbc.password=no_superuser_password" ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }} - name: Upload Gradle test reports if: always() @@ -1242,7 +1253,7 @@ jobs: docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Create no superuser - run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver19 SqlServer19 10 3 + run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer19 10 3 sqlserver19 timeout-minutes: 1 - name: Setup Gradle @@ -1312,7 +1323,7 @@ jobs: docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Create no superuser - run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver22 SqlServer22 10 3 + run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer22 10 3 sqlserver22 timeout-minutes: 1 - name: Setup Gradle diff --git a/ci/no-superuser/create-no-superuser-sqlserver.sh b/ci/no-superuser/create-no-superuser-sqlserver.sh index d689390a4d..99f03db851 100755 --- a/ci/no-superuser/create-no-superuser-sqlserver.sh +++ b/ci/no-superuser/create-no-superuser-sqlserver.sh @@ -2,19 +2,24 @@ set -u # Get container name and password from arguments -SQL_SERVER_CONTAINER_NAME=$1 -SQL_SERVER_PASSWORD=$2 -MAX_RETRY_COUNT=$3 -RETRY_INTERVAL=$4 +SQL_SERVER_PASSWORD=$1 +MAX_RETRY_COUNT=$2 +RETRY_INTERVAL=$3 +# If set, use `sqlcmd` of the SQL Server docker container. If unset, use `sqlcmd` installed on the host. +SQL_SERVER_CONTAINER_NAME=${4:-''} COUNT=0 -# Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not. -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd -if [[ $? -eq 0 ]]; then - SQLCMD=/opt/mssql-tools18/bin/sqlcmd +if [[ -n $SQL_SERVER_CONTAINER_NAME ]]; then + # Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not. + docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd + if [[ $? -eq 0 ]]; then + SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools18/bin/sqlcmd" + else + # If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command. + SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools/bin/sqlcmd" + fi else - # If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command. - SQLCMD=/opt/mssql-tools/bin/sqlcmd + SQLCMD=sqlcmd fi echo "INFO: Creating no superuser start." @@ -30,7 +35,7 @@ do echo "INFO: Retry count: ${COUNT}" - docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "SELECT 1" + ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "SELECT 1" if [[ $? -eq 0 ]]; then break @@ -50,40 +55,40 @@ echo "INFO: sqlcmd command succeeded. Continue creating no superuser." # Create login echo "INFO: Create login start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE LOGIN no_superuser WITH PASSWORD = 'no_superuser_password', DEFAULT_DATABASE = master , CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE LOGIN no_superuser WITH PASSWORD = 'no_superuser_password', DEFAULT_DATABASE = master , CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" echo "INFO: Create login end" # Create database echo "INFO: Create database start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE DATABASE test_db COLLATE Japanese_BIN2" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE DATABASE test_db COLLATE Japanese_BIN2" echo "INFO: Create database end" # Create no_superuser echo "INFO: Create no_superuser start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "CREATE USER no_superuser FOR LOGIN no_superuser" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "CREATE USER no_superuser FOR LOGIN no_superuser" echo "INFO: Create no_superuser end" # Add roles echo "INFO: Add role db_ddladmin start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = 'no_superuser'" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = 'no_superuser'" echo "INFO: Add role db_ddladmin end" echo "INFO: Add role db_datawriter start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = 'no_superuser'" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = 'no_superuser'" echo "INFO: Add role db_datawriter end" echo "INFO: Add role db_datareader start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datareader', @membername = 'no_superuser'" +${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datareader', @membername = 'no_superuser'" echo "INFO: Add role db_datareader end" # Check the collation of test_db (for debugging purposes) echo "INFO: Check collation start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT name, collation_name FROM sys.databases" +${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT name, collation_name FROM sys.databases" echo "INFO: Check collation end" # Check if no_superuser can access SQL Server (for debugging purposes) echo "INFO: SELECT @@version start" -docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT @@version" +${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT @@version" echo "INFO: SELECT @@version end" echo "INFO: Creating no superuser succeeded." diff --git a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitNullMetadataIntegrationTestBase.java b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitNullMetadataIntegrationTestBase.java index 3da00baba7..78e8aad1b4 100644 --- a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitNullMetadataIntegrationTestBase.java +++ b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitNullMetadataIntegrationTestBase.java @@ -638,7 +638,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback( selection_SelectionGivenForPreparedWhenCoordinatorStateNotExistAndExpired_ShouldAbortTransaction( Selection s) throws ExecutionException, CoordinatorException, TransactionException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; populatePreparedRecordWithNullMetadataAndCoordinatorStateRecord( storage, namespace1, TABLE_1, TransactionState.PREPARED, prepared_at, null); DistributedTransaction transaction = manager.begin(); @@ -1002,7 +1002,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback() selection_SelectionGivenForDeletedWhenCoordinatorStateNotExistAndExpired_ShouldAbortTransaction( Selection s) throws ExecutionException, CoordinatorException, TransactionException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; populatePreparedRecordWithNullMetadataAndCoordinatorStateRecord( storage, namespace1, TABLE_1, TransactionState.DELETED, prepared_at, null); DistributedTransaction transaction = manager.begin(); diff --git a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitSpecificIntegrationTestBase.java b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitSpecificIntegrationTestBase.java index c2a41c7aed..60d4d6ef72 100644 --- a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitSpecificIntegrationTestBase.java +++ b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitSpecificIntegrationTestBase.java @@ -512,7 +512,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback( Selection s, CommitType commitType) throws ExecutionException, CoordinatorException, TransactionException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; String ongoingTxId = populatePreparedRecordAndCoordinatorStateRecord( storage, namespace1, TABLE_1, TransactionState.PREPARED, prepared_at, null, commitType); @@ -919,7 +919,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback( Selection s, CommitType commitType) throws ExecutionException, CoordinatorException, TransactionException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; String ongoingTxId = populatePreparedRecordAndCoordinatorStateRecord( storage, namespace1, TABLE_1, TransactionState.DELETED, prepared_at, null, commitType); diff --git a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitSpecificIntegrationTestBase.java b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitSpecificIntegrationTestBase.java index 7da0b99c27..9c0516099a 100644 --- a/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitSpecificIntegrationTestBase.java +++ b/integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitSpecificIntegrationTestBase.java @@ -418,7 +418,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback( SelectionType selectionType) throws ExecutionException, TransactionException, CoordinatorException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; populatePreparedRecordAndCoordinatorStateRecordForStorage1( TransactionState.PREPARED, prepared_at, null); @@ -794,7 +794,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback() SelectionType selectionType) throws ExecutionException, TransactionException, CoordinatorException { // Arrange - long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS; + long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1; populatePreparedRecordAndCoordinatorStateRecordForStorage1( TransactionState.DELETED, prepared_at, null); From e27606a6750a73cb8dbdeff569ca0adcb8b64447 Mon Sep 17 00:00:00 2001 From: Vincent Guilpain Date: Tue, 22 Apr 2025 17:37:14 +0900 Subject: [PATCH 2/3] Fix format [skip ci] --- .../create-no-superuser-sqlserver.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ci/no-superuser/create-no-superuser-sqlserver.sh b/ci/no-superuser/create-no-superuser-sqlserver.sh index 99f03db851..7143e8aa2a 100755 --- a/ci/no-superuser/create-no-superuser-sqlserver.sh +++ b/ci/no-superuser/create-no-superuser-sqlserver.sh @@ -10,16 +10,16 @@ SQL_SERVER_CONTAINER_NAME=${4:-''} COUNT=0 if [[ -n $SQL_SERVER_CONTAINER_NAME ]]; then - # Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not. - docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd - if [[ $? -eq 0 ]]; then - SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools18/bin/sqlcmd" - else - # If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command. - SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools/bin/sqlcmd" - fi + # Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not. + docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd + if [[ $? -eq 0 ]]; then + SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools18/bin/sqlcmd" + else + # If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command. + SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools/bin/sqlcmd" + fi else - SQLCMD=sqlcmd + SQLCMD=sqlcmd fi echo "INFO: Creating no superuser start." From 407c806701bcf3b1639fd9f52f64107927772062 Mon Sep 17 00:00:00 2001 From: Vincent Guilpain Date: Wed, 23 Apr 2025 09:16:55 +0900 Subject: [PATCH 3/3] Add comments and fix ordering of condition --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c442607646..fe9c234ed5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,7 @@ env: ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVersion: "${{ github.event_name != 'workflow_dispatch' && '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION }}" ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVendor: "${{ github.event_name != 'workflow_dispatch' && 'temurin' || inputs.INT_TEST_JAVA_RUNTIME_VENDOR }}" # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK)} then {true} else {false} + # Oracle JDK that are linux compatible and publicly available through direct download exist for all LTS versions SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle')) && 'true' || 'false' }}" INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT: '"-Dscalardb.consensus_commit.coordinator.group_commit.enabled=true" "-Dscalardb.consensus_commit.coordinator.group_commit.old_group_abort_timeout_millis=15000" --tests "**.ConsensusCommit**"' @@ -244,9 +245,10 @@ jobs: name: Cosmos DB integration test (${{ matrix.mode.label }}) runs-on: windows-latest env: + # Official Oracle JDK images that are windows compatible and publicly available through direct download do not exist for JDK 8 and 11 so we use instead cached versions hosted on the Scalar container registry. # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false} SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}" - SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}" + 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' }}" strategy: matrix: @@ -1122,9 +1124,10 @@ jobs: name: SQL Server 2017 integration test (${{ matrix.mode.label }}) runs-on: windows-latest env: + # Official Oracle JDK images that are windows compatible and publicly available through direct download do not exist for JDK 8 and 11 so we use instead cached versions hosted on the Scalar container registry. # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false} SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}" - SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}" + 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' }}" strategy: matrix: