-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add tests that access AWS #208
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4945055
Add tests that access AWS
julienrf 127429d
Use AssumeRoleWithWebIdentity instead of AssumeRole with static IAM c…
julienrf babe657
Fallback to the default credentials if no static credentials are prov…
julienrf 1ab3a51
Make sure to terminate the application after we dumped the migration …
julienrf b31e52f
Set up savepoints manager only during the writing process
julienrf 8bfe80d
Increase timeout of long tests to avoid CI flakiness
julienrf 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 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,51 @@ | ||
name: Tests with AWS | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- '**.scala' | ||
- '**.sbt' | ||
workflow_dispatch: | ||
|
||
env: | ||
AWS_REGION: us-east-1 | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache Docker images | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose-tests.yml') }} | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
cache: sbt | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: ${{ env.AWS_REGION }} | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
- name: Build migrator | ||
run: ./build.sh | ||
- name: Set up services | ||
run: | | ||
docker compose -f docker-compose-tests.yml up -d scylla spark-master spark-worker | ||
.github/wait-for-port.sh 8000 # ScyllaDB Alternator | ||
.github/wait-for-cql.sh scylla | ||
.github/wait-for-port.sh 8080 # Spark master | ||
.github/wait-for-port.sh 8081 # Spark worker | ||
- name: Run tests accessing AWS | ||
run: sbt "testOnly -- --include-categories=com.scylladb.migrator.AWS" | ||
- name: Stop services | ||
run: docker compose -f docker-compose-tests.yml down |
This file contains 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 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 |
---|---|---|
|
@@ -3,7 +3,13 @@ on: | |
push: | ||
branches: | ||
- master | ||
paths: | ||
- '**.scala' | ||
- '**.sbt' | ||
pull_request: | ||
paths: | ||
- '**.scala' | ||
- '**.sbt' | ||
|
||
env: | ||
TUTORIAL_DIR: docs/source/tutorials/dynamodb-to-scylladb-alternator | ||
|
@@ -17,7 +23,7 @@ jobs: | |
- name: Cache Docker images | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose-tests.yml') }} | ||
key: docker-${{ runner.os }}-${{ hashFiles('docs/source/tutorials/dynamodb-to-scylladb-alternator/docker-compose.yaml') }} | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
|
This file contains 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
cassandra/ | ||
s3/ | ||
scylla/ | ||
scylla-source/ | ||
spark-master/ |
This file contains 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,4 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we compile with jdk 11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, ok, it was blocked due to spark 2.x
ok, so maybe we can switch to jdk 11 with spark 3.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really important to be support Java 8, but if we can, why not do it? Using Java 8 in the CI ensures that we at least support Java 8. On the other hand, that could also prevent us from detecting possible incompatibilities with higher versions of the JVM…
But anyway, that should be a separate issue/PR :)