-
Notifications
You must be signed in to change notification settings - Fork 40
Backport to branch(3) : Add support for S3 #3175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Test Object Storage Adapter | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| INT_TEST_JAVA_RUNTIME_VERSION: | ||
| description: JDK version used to run the integration test | ||
| type: choice | ||
| required: false | ||
| default: '8' | ||
| options: | ||
| - '8' | ||
| - '11' | ||
| - '17' | ||
| - '21' | ||
| INT_TEST_JAVA_RUNTIME_VENDOR: | ||
| description: Vendor of the JDK used to run the integration test | ||
| type: choice | ||
| required: false | ||
| default: 'temurin' | ||
| options: | ||
| - 'corretto' | ||
| - 'microsoft' | ||
| - 'oracle' | ||
| - 'temurin' | ||
|
|
||
| env: | ||
| TERM: dumb | ||
| JAVA_VERSION: '8' | ||
| JAVA_VENDOR: 'temurin' | ||
| INT_TEST_JAVA_RUNTIME_VERSION: "${{ github.event_name != 'workflow_dispatch' && '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION }}" | ||
| INT_TEST_JAVA_RUNTIME_VENDOR: "${{ github.event_name != 'workflow_dispatch' && 'temurin' || inputs.INT_TEST_JAVA_RUNTIME_VENDOR }}" | ||
| # Gradle will parse 'ORG_GRADLE_PROJECT_<project_property_name>' environment variables as project properties. | ||
| # The following variables configure the 'com.scalar.db.jdk-configuration' Gradle plugin. | ||
| ORG_GRADLE_PROJECT_javaVersion: '8' | ||
| ORG_GRADLE_PROJECT_javaVendor: 'temurin' | ||
| 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**"' | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} | ||
| S3_REGION: ap-northeast-1 | ||
| S3_BUCKET_NAME: scalardb-test-bucket | ||
|
|
||
| jobs: | ||
| integration-test-s3: | ||
| name: S3 integration test (${{ matrix.mode.label }}) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| mode: | ||
| - label: default | ||
| group_commit_enabled: false | ||
| - label: with_group_commit | ||
| group_commit_enabled: true | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - 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: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test | ||
| uses: actions/setup-java@v5 | ||
| if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} | ||
| with: | ||
| java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} | ||
| distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} | ||
|
|
||
| - name: Login to Oracle container registry | ||
| uses: docker/login-action@v3 | ||
| if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} | ||
| with: | ||
| registry: container-registry.oracle.com | ||
| username: ${{ secrets.OCR_USERNAME }} | ||
| password: ${{ secrets.OCR_TOKEN }} | ||
|
|
||
| - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test | ||
| if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} | ||
| 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" | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@v5 | ||
|
|
||
| - name: Execute Gradle 'integrationTestObjectStorage' task | ||
| run: ./gradlew integrationTestObjectStorage -Dscalardb.object_storage.storage=s3 -Dscalardb.object_storage.endpoint=${{ env.S3_REGION }}/${{ env.S3_BUCKET_NAME }} ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }} | ||
|
|
||
| - name: Upload Gradle test reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: cassandra_3.0_integration_test_reports_${{ matrix.mode.label }} | ||
| path: core/build/reports/tests/integrationTestObjectStorage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
core/src/main/java/com/scalar/db/storage/objectstorage/ConflictOccurredException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.scalar.db.storage.objectstorage; | ||
|
|
||
| public class ConflictOccurredException extends ObjectStorageWrapperException { | ||
|
|
||
| public ConflictOccurredException(String message, Throwable cause) { | ||
| super(message, cause); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.