Skip to content
Merged
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
29 changes: 29 additions & 0 deletions .github/workflows/node-lambda-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals end-to-end tests as a canary to
## test the artifacts for App Signals enablement.
name: Node Lambda Enablement Canary Testing
on:
schedule:
- cron: '*/15 * * * *' # run the workflow every 15 minutes
workflow_dispatch: # be able to run the workflow on demand

permissions:
id-token: write
contents: read

jobs:
default:
strategy:
fail-fast: false
matrix:
aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
'us-east-1','us-east-2', 'us-west-1', 'us-west-2']
uses: ./.github/workflows/node-ec2-default-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
caller-workflow-name: 'appsignals-node-e2e-lambda-canary-test'
57 changes: 57 additions & 0 deletions .github/workflows/node-lambda-retry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

# This is a reusable workflow for running the Enablement test for App Signals.
# It is meant to be called from another workflow.
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
name: Node Lambda Retry
on:
workflow_call:
inputs:
aws-region:
required: true
type: string
caller-workflow-name:
required: true
type: string

permissions:
id-token: write
contents: read

jobs:
node-lambda-attempt-1:
uses: ./.github/workflows/node-lambda-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}

node-lambda-attempt-2:
needs: [ node-lambda-attempt-1 ]
if: ${{ needs.node-lambda-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/node-lambda-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}

publish-metric-attempt-1:
needs: [ node-lambda-attempt-1, node-lambda-attempt-2 ]
if: always()
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}

publish-metric-attempt-2:
needs: [ node-lambda-attempt-1, node-lambda-attempt-2, publish-metric-attempt-1 ]
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.node-lambda-attempt-1.outputs.validation-result || needs.node-lambda-attempt-2.outputs.validation-result }}
14 changes: 11 additions & 3 deletions .github/workflows/node-lambda-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ env:
METRIC_NAMESPACE: ApplicationSignals
LOG_GROUP_NAME: /aws/application-signals/data
TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE}
STAGING_S3_BUCKET: ${{ secrets.STAGING_BUCKET_NAME }}
IS_CANARY: false

jobs:
node-lambda-default:
Expand Down Expand Up @@ -95,8 +97,12 @@ jobs:

- name: Download Lambda Layer and Function artifacts
run: |
aws s3 cp s3://adot-autoinstrumentation-node-staging/layer-${{ github.run_id }}.zip ${{ env.ARTIFACTS_DIR }}/layer.zip |
aws s3 cp s3://adot-autoinstrumentation-node-staging/function-${{ github.run_id }}.zip ${{ env.ARTIFACTS_DIR }}/function.zip
aws s3 cp s3://${{ env.STAGING_S3_BUCKET }}/layer-${{ github.run_id }}.zip ${{ env.ARTIFACTS_DIR }}/layer.zip |
aws s3 cp s3://${{ env.STAGING_S3_BUCKET }}/function-${{ github.run_id }}.zip ${{ env.ARTIFACTS_DIR }}/function.zip

- name: Set Canary Environment Variable
if: ${{ github.event.inputs.CALLER_WORKFLOW_NAME == 'appsignals-node-e2e-lambda-canary-test' }}
run: echo IS_CANARY=true >> $GITHUB_ENV

- name: Set up terraform
uses: ./.github/workflows/actions/execute_and_retry
Expand Down Expand Up @@ -124,7 +130,9 @@ jobs:
with:
command: 'cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/node/lambda/lambda && terraform apply -auto-approve
-var="sdk_layer_name=AWSOpenTelemetryDistroJs-${{ github.run_id }}"
-var="function_name=${{env.TERRAFORM_LAMBDA_FUNCTION_NAME}}" -var="layer_artifacts_directory=${{ env.ARTIFACTS_DIR }}"'
-var="function_name=${{env.TERRAFORM_LAMBDA_FUNCTION_NAME}}"
-var="layer_artifacts_directory=${{ env.ARTIFACTS_DIR }}"
-var="is_canary=${{ env.IS_CANARY }}"'
max_retry: 6
sleep_time: 60
- name: Extract endpoint
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/python-lambda-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals Python end-to-end tests as a canary to
## test the artifacts for Application Signals enablement.
name: Python Lambda Enablement Canary Testing
on:
schedule:
- cron: '*/15 * * * *' # run the workflow every 15 minutes
workflow_dispatch: # be able to run the workflow on demand

permissions:
id-token: write
contents: read

jobs:
github:
strategy:
fail-fast: false
matrix:
aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
'us-east-1','us-east-2', 'us-west-1', 'us-west-2']
uses: ./.github/workflows/python-lambda-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
caller-workflow-name: 'appsignals-python-e2e-lambda-canary-test'
python-version: '3.12'
cpu-architecture: 'x86_64'

80 changes: 80 additions & 0 deletions .github/workflows/python-lambda-retry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

# This is a reusable workflow for running the Enablement test for App Signals.
# It is meant to be called from another workflow.
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
name: Python Lambda Default Retry
on:
workflow_call:
inputs:
aws-region:
required: true
type: string
caller-workflow-name:
required: true
type: string
python-version:
required: true
type: string
staging-wheel-name:
required: false
default: 'aws-opentelemetry-distro'
type: string
cpu-architecture:
required: false
type: string
default: "x86_64"
otel-source:
required: false
type: string
default: 'github'

permissions:
id-token: write
contents: read

jobs:
python-lambda-attempt-1:
uses: ./.github/workflows/python-lambda-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
python-version: ${{ inputs.python-version }}
staging-wheel-name: ${{ inputs.staging-wheel-name }}
otel-source: ${{ inputs.otel-source }}
cpu-architecture: ${{ inputs.cpu-architecture }}

python-lambda-attempt-2:
needs: [ python-lambda-attempt-1 ]
if: ${{ needs.python-lambda-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/python-lambda-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
python-version: ${{ inputs.python-version }}
staging-wheel-name: ${{ inputs.staging-wheel-name }}
otel-source: ${{ inputs.otel-source }}
cpu-architecture: ${{ inputs.cpu-architecture }}

publish-metric-attempt-1:
needs: [ python-lambda-attempt-1, python-lambda-attempt-2 ]
if: always()
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}

publish-metric-attempt-2:
needs: [ python-lambda-attempt-1, python-lambda-attempt-2, publish-metric-attempt-1 ]
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.python-lambda-attempt-1.outputs.validation-result || needs.python-lambda-attempt-2.outputs.validation-result }}
Loading