Bump @typescript-eslint/parser in /nodejs/wrapper-adot (#820) #10
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
name: Python-3.11 Layer Integration Test | |
# This workflow is for verifying python3.11 layer in Lambda python3.8 environment | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
paths-ignore: | |
- '.github/**' | |
- '!.github/workflows/main-build-python311.yml' | |
- '**.md' | |
workflow_dispatch: | |
concurrency: | |
group: main-build-python311-${{ github.ref_name }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
jobs: | |
integration-test: | |
runs-on: ubuntu-20.04 | |
name: Python311-${{ matrix.architecture }}-IntegrationTest | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ amd64, arm64 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '~1.21.3' | |
check-latest: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Cache (Python) | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.INTEG_TEST_LAMBDA_ROLE_ARN }} | |
role-duration-seconds: 7200 | |
aws-region: us-east-1 | |
- name: Patch ADOT | |
run: ./patch-upstream.sh | |
- name: Login to Public ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: public.ecr.aws | |
- name: Build layers / functions | |
run: GOARCH=${{ matrix.architecture }} ./build.sh ${{ matrix.architecture }} | |
working-directory: python | |
- name: Get Lambda Layer amd64 architecture value | |
if: ${{ matrix.architecture == 'amd64' }} | |
run: echo LAMBDA_FUNCTION_ARCH=x86_64 | tee --append $GITHUB_ENV | |
- name: Get Lambda Layer arm64 architecture value | |
if: ${{ matrix.architecture == 'arm64' }} | |
run: echo LAMBDA_FUNCTION_ARCH=arm64 | tee --append $GITHUB_ENV | |
- name: Get terraform directory | |
run: | | |
echo TERRAFORM_DIRECTORY=python/integration-tests/aws-sdk/wrapper | | |
tee --append $GITHUB_ENV | |
- uses: hashicorp/setup-terraform@v2 | |
- name: Initialize terraform | |
run: terraform init | |
working-directory: ${{ env.TERRAFORM_DIRECTORY }} | |
- name: Get terraform Lambda function name | |
run: | | |
echo TERRAFORM_LAMBDA_FUNCTION_NAME=lambda-python-${{ matrix.architecture }}-${{ github.run_id }} | | |
tee --append $GITHUB_ENV | |
- name: Apply terraform | |
run: terraform apply -auto-approve | |
working-directory: ${{ env.TERRAFORM_DIRECTORY }} | |
env: | |
TF_VAR_sdk_layer_name: opentelemetry-python-aws-sdk-wrapper-${{ matrix.architecture }} | |
TF_VAR_function_name: ${{ env.TERRAFORM_LAMBDA_FUNCTION_NAME }} | |
TF_VAR_architecture: ${{ env.LAMBDA_FUNCTION_ARCH }} | |
TF_VAR_runtime: 'python3.11' | |
- name: Extract endpoint | |
id: extract-endpoint | |
run: terraform output -raw api-gateway-url | |
working-directory: ${{ env.TERRAFORM_DIRECTORY }} | |
- name: Extract SDK layer arn | |
id: extract-sdk-layer-arn | |
run: terraform output -raw sdk_layer_arn | |
working-directory: ${{ env.TERRAFORM_DIRECTORY }} | |
- name: Output annotations | |
run: | | |
echo "::warning::Function: ${{ env.TERRAFORM_LAMBDA_FUNCTION_NAME }}" | |
echo "::warning::SDK Layer ARN: ${{ steps.extract-sdk-layer-arn.outputs.stdout }}" | |
- name: Send request to endpoint | |
run: curl -sS ${{ steps.extract-endpoint.outputs.stdout }} | |
- name: Checkout test framework | |
uses: actions/checkout@v4 | |
with: | |
repository: aws-observability/aws-otel-test-framework | |
path: test-framework | |
- name: validate trace sample | |
run: | | |
cp adot/utils/expected-templates/python-aws-sdk-wrapper.json \ | |
test-framework/validator/src/main/resources/expected-data-template/lambdaExpectedTrace.mustache | |
cd test-framework | |
./gradlew :validator:run --args="-c default-lambda-validation.yml --endpoint ${{ steps.extract-endpoint.outputs.stdout }} --region $AWS_REGION" | |
- name: Destroy terraform | |
if: always() | |
run: terraform destroy -auto-approve | |
working-directory: ${{ env.TERRAFORM_DIRECTORY }} | |
env: | |
TF_VAR_architecture: ${{ env.LAMBDA_FUNCTION_ARCH }} |