Skip to content

Commit 3a14868

Browse files
[OTLP/OCB] Add e2e canary tests running on Java/EKS using OTLP endpoint (#328)
*Issue description:* Add test case for OTLP+OCB testing - Add e2e test Canary running in IAD in new OTLP specific test accounts - Added validation files - Note - The diffs compared to non-OTLP are numerous. [See majority of the diffs here](5622948). - Added terraform files - Include test resources specific for OTLP+OCB testing: - `terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml` - Contains OCB Collector and auto-instrumentation configurations for use on EKS - `terraform/java/eks-otlp-ocb/util/enable-app-signals-ocb.sh` - Enablement script to install OpenTelemetry Operator in EKS cluster and sets up IAM Service Account. Update Validator - support `remoteServiceIp` input - if provided, query metrics for remoteServiceNames with `remoteServiceIp` - Changes to `validator/src/main/java/com/amazon/aoc/models/xray/Entity.java` - Validate `metadata` as Map<String, Object> instead of Map<String, Map<String, Object>>. This change is needed for OTLP+OCB test cases, and has been validated to work with the existing non-OTLP test cases. *Description of changes:* *Rollback procedure:* - We safely revert this commit if needed *Ensure you've run the following tests on your changes and include the link below:* - Test ran in new OTLP account (Java+EKS): https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/12058149370 - Run Java EKS on `e2e-playground` in us-east-1 https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/12061315729 - Run Python EKS on `e2e-playground` in us-east-1 https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/12061315729 - ~~Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2~~ - Run EC2 tests in all regions https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/12060250860/job/33630333497 - ~~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. --------- Co-authored-by: Mahad Janjua <[email protected]>
1 parent 493353a commit 3a14868

27 files changed

+2645
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
## This workflow aims to run the Application Signals end-to-end tests as a canary to
5+
## test the artifacts for App Signals enablement. It will deploy a sample app and remote
6+
## service onto an EKS cluster, instrumented using an OTel Collector built through
7+
## OTel Collector Builder (OCB) and interacting with the OTLP endpoint for this use case.
8+
## Logs, metrics, and traces are all validated.
9+
name: Java EKS OTLP/OCB Enablement Canary Test
10+
on:
11+
schedule:
12+
- cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour
13+
workflow_dispatch: # be able to run the workflow on demand
14+
15+
permissions:
16+
id-token: write
17+
contents: read
18+
19+
jobs:
20+
eks:
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
aws-region: ['us-east-1']
25+
# TODO: Reintroduce all regions
26+
# 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',
27+
# 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
28+
# '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',
29+
# 'us-east-1','us-east-2','us-west-1','us-west-2']
30+
uses: ./.github/workflows/java-eks-otlp-ocb-retry.yml
31+
secrets: inherit
32+
with:
33+
aws-region: ${{ matrix.aws-region }}
34+
test-cluster-name: 'e2e-java-otlp-ocb-canary-test'
35+
caller-workflow-name: 'appsignals-java-e2e-eks-otlp-ocb-canary-test'
36+
java-version: '11'
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
# This is a reusable workflow for running the Enablement test for App Signals.
5+
# It is meant to be called from another workflow.
6+
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
7+
name: Java EKS OTLP/OCB Retry
8+
on:
9+
workflow_call:
10+
inputs:
11+
aws-region:
12+
required: true
13+
type: string
14+
test-cluster-name:
15+
required: true
16+
type: string
17+
caller-workflow-name:
18+
required: true
19+
type: string
20+
java-version:
21+
required: true
22+
type: string
23+
24+
concurrency:
25+
group: 'java-eks-otlp-ocb-${{ inputs.aws-region }}-${{ github.ref_name }}'
26+
cancel-in-progress: false
27+
28+
permissions:
29+
id-token: write
30+
contents: read
31+
32+
jobs:
33+
java-eks-otlp-ocb-attempt-1:
34+
uses: ./.github/workflows/java-eks-otlp-ocb-test.yml
35+
secrets: inherit
36+
with:
37+
aws-region: ${{ inputs.aws-region }}
38+
test-cluster-name: ${{ inputs.test-cluster-name }}
39+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
40+
java-version: ${{ inputs.java-version }}
41+
42+
java-eks-otlp-ocb-attempt-2:
43+
needs: [ java-eks-otlp-ocb-attempt-1 ]
44+
if: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.job-started != 'true' }}
45+
uses: ./.github/workflows/java-eks-otlp-ocb-test.yml
46+
secrets: inherit
47+
with:
48+
aws-region: ${{ inputs.aws-region }}
49+
test-cluster-name: ${{ inputs.test-cluster-name }}
50+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
51+
java-version: ${{ inputs.java-version }}
52+
53+
publish-metric-attempt-1:
54+
needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2 ]
55+
if: always()
56+
uses: ./.github/workflows/enablement-test-publish-result.yml
57+
secrets: inherit
58+
with:
59+
aws-region: ${{ inputs.aws-region }}
60+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
61+
validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }}
62+
63+
publish-metric-attempt-2:
64+
needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2, publish-metric-attempt-1 ]
65+
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
66+
uses: ./.github/workflows/enablement-test-publish-result.yml
67+
secrets: inherit
68+
with:
69+
aws-region: ${{ inputs.aws-region }}
70+
caller-workflow-name: ${{ inputs.caller-workflow-name }}
71+
validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }}

0 commit comments

Comments
 (0)