Skip to content

Commit

Permalink
[Dotnet] Implement EKS Linux E2E Test (#215)
Browse files Browse the repository at this point in the history
*Description of changes:*
Implement EKS Linux for Dotnet E2E Canary
*Rollback procedure:*
Revert it
<Can we safely revert this commit if needed? If not, detail what must be
done to safely revert and why it is needed.>
Yes
*Ensure you've run the following tests on your changes and include the
link below:*
*Test*

https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10742366614

To do so, create a `test.yml` file with `name: Test` and workflow
description to test your changes, then remove the file for your PR. Link
your test run in your PR description. This process is a short term
solution while we work on creating a staging environment for testing.

NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL.
See the
[needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)
keyword to run tests in succession.
- Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and
eu-central-2
- Run EC2 tests in all regions
- Run K8s on a separate K8s cluster (check IAD test account for master
node endpoints; these will change as we create and destroy clusters for
OS patching)

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
  • Loading branch information
XinRanZhAWS authored Sep 12, 2024
1 parent 31dc23e commit b61217b
Show file tree
Hide file tree
Showing 22 changed files with 2,733 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/dotnet-eks-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals DotNet end-to-end tests as a canary to
## test the artifacts for Application Signals enablement. It will deploy a sample app and remote
## service onto an EKS cluster, call the APIs, and validate the generated telemetry,
## including logs, metrics, and traces.
name: Dotnet EKS Enablement Canary Testing
on:
schedule:
- cron: '*/15 * * * *' # run the workflow every 15 minutes
workflow_dispatch: # be able to run the workflow on demand

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

permissions:
id-token: write
contents: read


jobs:
eks:
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/dotnet-eks-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
test-cluster-name: 'e2e-dotnet-canary-test'
caller-workflow-name: 'appsignals-dotnet-e2e-eks-canary-test'
66 changes: 66 additions & 0 deletions .github/workflows/dotnet-eks-retry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## 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: Dotnet EKS Retry
on:
workflow_call:
inputs:
aws-region:
required: true
type: string
test-cluster-name:
required: true
type: string
caller-workflow-name:
required: true
type: string

concurrency:
group: 'dotnet-eks-${{ inputs.aws-region }}-${{ github.ref_name }}'
cancel-in-progress: false

permissions:
id-token: write
contents: read

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

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

publish-metric-attempt-1:
needs: [ dotnet-eks-attempt-1, dotnet-eks-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.dotnet-eks-attempt-1.outputs.validation-result || needs.dotnet-eks-attempt-2.outputs.validation-result }}

publish-metric-attempt-2:
needs: [ dotnet-eks-attempt-1, dotnet-eks-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.dotnet-eks-attempt-1.outputs.validation-result || needs.dotnet-eks-attempt-2.outputs.validation-result }}
Loading

0 comments on commit b61217b

Please sign in to comment.