Skip to content
Closed
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
55 changes: 54 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,44 @@ permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

env:
AWS_REGION: us-west-2
FILESYSTEM_INFRASTRUCTURE_STACK_NAME: JavaSDKFileSystemSerDesE2EInfrastructureStack

jobs:
filesystem-infrastructure:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
with:
role-to-assume: "${{ secrets.TEST_ROLE_ARN }}"
role-session-name: java-language-sdk-test-infrastructure
aws-region: ${{ env.AWS_REGION }}
allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }}
- name: Test SAM template generator
run: python3 -m unittest test_generate_template.py
working-directory: ./examples
- name: Generate persistent filesystem SerDes E2E infrastructure template
run: |
python3 generate-template.py \
--file-system-infrastructure-only \
--output filesystem-infrastructure-template.yaml
working-directory: ./examples
- name: Ensure persistent filesystem SerDes E2E infrastructure
run: |
aws cloudformation deploy \
--template-file filesystem-infrastructure-template.yaml \
--stack-name ${{ env.FILESYSTEM_INFRASTRUCTURE_STACK_NAME }} \
--no-fail-on-empty-changeset \
--tags Purpose=JavaSDKFileSystemSerDesE2E
working-directory: ./examples

e2e-tests:
needs: filesystem-infrastructure
env:
AWS_REGION: us-west-2
E2E_TEST_PARALLELISM: 4
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -71,13 +105,24 @@ jobs:
- name: Generate SAM template
run: python3 generate-template.py
working-directory: ./examples
- name: Generate filesystem SerDes E2E SAM template
run: python3 generate-template.py --file-system-only --output filesystem-template.yaml
working-directory: ./examples
- name: sam build
env:
MAVEN_OPTS: -DskipTests=true -Dmaven.test.skip=true
run: | # add --no-cached if debugging sam build
sam build --debug --parameter-overrides \
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}'
working-directory: ./examples
- name: sam build filesystem SerDes E2E stack
env:
MAVEN_OPTS: -DskipTests=true -Dmaven.test.skip=true
run: |
sam build --debug --template-file filesystem-template.yaml --build-dir .aws-sam-filesystem \
--parameter-overrides \
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }} ParameterKey=FileSystemInfrastructureStackName,ParameterValue=${{ env.FILESYSTEM_INFRASTRUCTURE_STACK_NAME }}'
working-directory: ./examples
- name: Clean up unmanaged Lambda log groups
run: |
# TODO: Remove this one-time migration cleanup after existing e2e stacks adopt managed log groups.
Expand All @@ -89,12 +134,20 @@ jobs:
--resolve-image-repos --resolve-s3 --parameter-overrides \
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}'
working-directory: ./examples
- name: sam deploy filesystem SerDes E2E stack
run: |
sam deploy --template-file .aws-sam-filesystem/template.yaml \
--stack-name Java${{ matrix.java }}-JavaSDKFileSystemSerDesE2EStack \
--resolve-s3 --parameter-overrides \
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=FunctionNamePrefix,ParameterValue=Java${{ matrix.java }}- ParameterKey=RoleArn,ParameterValue=${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }} ParameterKey=FileSystemInfrastructureStackName,ParameterValue=${{ env.FILESYSTEM_INFRASTRUCTURE_STACK_NAME }}'
working-directory: ./examples
- name: Record E2E log start time
run: echo "E2E_LOG_START_TIME_MS=$(date +%s%3N)" >> "$GITHUB_ENV"
- name: Cloud Based Integration Tests
run: |
mvn clean test -B \
-Dtest.cloud.enabled=true \
-Dtest.filesystem.enabled=true \
-Dtest.aws.account='${{ secrets.TEST_ACCOUNT_ID }}' \
-Dtest=CloudBasedIntegrationTest \
-Dtest.function.name.prefix='Java${{ matrix.java }}-' \
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ __pycache__/
# SAM
.aws-sam/
examples/template.yaml
examples/filesystem-template.yaml
samconfig.toml
samconfig.toml.bak

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ See [Deploy Lambda durable functions with Infrastructure as Code](https://docs.a
**Advanced Topics**

- [<u>Configuration</u>](docs/advanced/configuration.md) - Customize SDK behaviour
- [<u>Serialization</u>](docs/advanced/serdes.md) - Custom SerDes, filesystem storage, previews, retries, and caching
- [<u>Error Handling</u>](docs/advanced/error-handling.md) - SDK exceptions for handling failures
- [<u>Logging</u>](docs/advanced/logging.md) - How to use DurableLogger
- [<u>Migrating from 1.x to 2.x</u>](docs/migration-1.x-to-2.x.md) - Upgrade guide for breaking changes since `v1.2.1`
Expand Down
Loading
Loading