Repository navigation
[github-actions]: Bump aws/aws-durable-execution-conformance-tests/.github/workflows/opentelemetry-orchestrator.yml from a628f5589bbf067a441696c792ab3023c0d0899b to 43872f8d5dd917fe3ee6d01a6c953c1ff67c5fe4 in /.github/workflows #1701
Workflow file for this run
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
| name: E2E Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/**' # for testing Github Actions | |
| - 'sdk/**' | |
| - 'sdk-testing/**' | |
| - 'sdk-integration-tests/**' | |
| - 'examples/**' | |
| - 'pom.xml' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/**' | |
| - 'sdk/**' | |
| - 'sdk-testing/**' | |
| - 'sdk-integration-tests/**' | |
| - 'examples/**' | |
| - 'pom.xml' | |
| concurrency: | |
| group: e2e-tests | |
| cancel-in-progress: false | |
| # permission can be added at job level or workflow level | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| e2e-tests: | |
| # 1. Run for non-PR events, such as scheduled runs and manual invocations | |
| # 2. For PRs, run only same-repo branches from non-Dependabot actors; forked PRs or Dependabot should not access secrets. | |
| if: github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository) | |
| env: | |
| AWS_REGION: us-west-2 | |
| E2E_TEST_PARALLELISM: 4 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: | |
| - 17 | |
| - 21 | |
| - 25 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup AWS SAM CLI | |
| uses: aws-actions/setup-sam@v3 | |
| with: | |
| use-installer: true | |
| # token: ${{ secrets.GITHUB_TOKEN }} # only enable if we run into throughput issues | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 | |
| with: | |
| role-to-assume: "${{ secrets.TEST_ROLE_ARN }}" | |
| role-session-name: java-language-sdk-test | |
| aws-region: ${{ env.AWS_REGION }} | |
| allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }} | |
| - name: Setup Java ${{ matrix.java }} | |
| uses: actions/setup-java@v6 | |
| with: | |
| distribution: corretto | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build locally | |
| run: mvn -B -q -Dmaven.test.skip=true install --file pom.xml | |
| - name: Generate SAM template | |
| run: python3 generate-template.py | |
| 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: Clean up unmanaged Lambda log groups | |
| run: | | |
| # TODO: Remove this one-time migration cleanup after existing e2e stacks adopt managed log groups. | |
| .github/scripts/cleanup_e2e_unmanaged_log_groups.sh --execute \ | |
| --stack-name Java${{ matrix.java }}-JavaSDKCloudBasedIntegrationTestStack | |
| - name: sam deploy | |
| run: | | |
| sam deploy --stack-name Java${{ matrix.java }}-JavaSDKCloudBasedIntegrationTestStack \ | |
| --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: 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.aws.account='${{ secrets.TEST_ACCOUNT_ID }}' \ | |
| -Dtest=CloudBasedIntegrationTest \ | |
| -Dtest.function.name.prefix='Java${{ matrix.java }}-' \ | |
| -Djunit.jupiter.execution.parallel.enabled=true \ | |
| -Djunit.jupiter.execution.parallel.mode.default=concurrent \ | |
| -Djunit.jupiter.execution.parallel.mode.classes.default=concurrent \ | |
| -Djunit.jupiter.execution.parallel.config.strategy=fixed \ | |
| -Djunit.jupiter.execution.parallel.config.fixed.parallelism=${{ env.E2E_TEST_PARALLELISM }} | |
| working-directory: ./examples | |
| - name: Check checkpoint invariant logs | |
| env: | |
| E2E_STACK_NAME: Java${{ matrix.java }}-JavaSDKCloudBasedIntegrationTestStack | |
| run: | | |
| set -euo pipefail | |
| # Allow the final Lambda invocation logs to reach CloudWatch before checking every | |
| # managed function log group created by the E2E stack. | |
| sleep 10 | |
| log_groups=$(aws cloudformation list-stack-resources \ | |
| --stack-name "$E2E_STACK_NAME" \ | |
| --query "StackResourceSummaries[?ResourceType=='AWS::Logs::LogGroup'].PhysicalResourceId" \ | |
| --output text) | |
| if [[ -z "$log_groups" ]]; then | |
| echo "::error::No managed Lambda log groups found for $E2E_STACK_NAME" | |
| exit 1 | |
| fi | |
| invariant_violated=false | |
| for log_group in $log_groups; do | |
| messages=$(aws logs filter-log-events \ | |
| --log-group-name "$log_group" \ | |
| --start-time "$E2E_LOG_START_TIME_MS" \ | |
| --filter-pattern '"Checkpoint invariant violation"' \ | |
| --query "events[].message" \ | |
| --output text) | |
| if [[ -n "$messages" ]]; then | |
| invariant_violated=true | |
| echo "::error title=Checkpoint invariant violation::Found in $log_group" | |
| echo "$messages" | |
| fi | |
| done | |
| if [[ "$invariant_violated" == true ]]; then | |
| exit 1 | |
| fi | |
| - name: Publish test case summary | |
| if: always() | |
| env: | |
| JAVA_VERSION: ${{ matrix.java }} | |
| run: python3 ../.github/scripts/publish_e2e_test_summary.py | |
| working-directory: ./examples |