Skip to content

Commit 3cc5c2e

Browse files
committed
Address TODOs
1 parent eff1b8f commit 3cc5c2e

File tree

4 files changed

+42
-40
lines changed

4 files changed

+42
-40
lines changed

.github/workflows/java-eks-otlp-ocb-canary.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
## SPDX-License-Identifier: Apache-2.0
33

4-
# TODO: Add comment
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.
59
name: Java EKS OTLP/OCB Enablement Canary Test
610
on:
11+
# TODO: Reintroduce cron-job
712
# schedule:
813
# - cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour
914
workflow_dispatch: # be able to run the workflow on demand
@@ -21,6 +26,7 @@ jobs:
2126
fail-fast: false
2227
matrix:
2328
aws-region: ['us-west-1']
29+
# TODO: Reintroduce all regions (one more first, then all except eu-central-2, then eu-central-2 when infra is deployed)
2430
# 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',
2531
# 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
2632
# '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',

.github/workflows/java-eks-otlp-ocb-retry.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,33 @@ jobs:
3939
caller-workflow-name: ${{ inputs.caller-workflow-name }}
4040
java-version: ${{ inputs.java-version }}
4141

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 }}
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 }}
5252

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 }}
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 }}
6262

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 }}
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 }}

.github/workflows/java-eks-otlp-ocb-test.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ env:
5454
TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE}
5555

5656
jobs:
57-
otlp-ocb:
57+
test:
5858
runs-on: ubuntu-latest
5959
timeout-minutes: 30
6060
outputs:
@@ -189,25 +189,24 @@ jobs:
189189
echo MAIN_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_MAIN_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}" >> $GITHUB_ENV
190190
echo REMOTE_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_REMOTE_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}" >> $GITHUB_ENV
191191
192-
# TODO: Fix retry, clean-app-signals doesn't work for enable-app-signals-ocb.sh
193192
- name: Install OTel Operator using enablement script
194193
uses: ./.github/workflows/actions/execute_and_retry
195194
with:
196195
command: "${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/enable-app-signals-ocb.sh \
197196
${{ env.CLUSTER_NAME }} \
198197
${{ env.E2E_TEST_AWS_REGION }} \
199198
${{ env.SAMPLE_APP_NAMESPACE }}"
200-
max_retry: 1
199+
max_retry: 3
201200
sleep_time: 60
202-
# TODO: cleanup and increase retries
203-
# cleanup: "TODO"
204201

205202
- name: Install OTel Collector
206203
uses: ./.github/workflows/actions/execute_and_retry
207204
with:
208205
command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}"
209206
cleanup: "kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \
210207
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}"
208+
max_retry: 3
209+
sleep_time: 60
211210

212211
- name: Deploy sample app via terraform and wait for the endpoint to come online
213212
id: deploy-sample-app
@@ -389,16 +388,13 @@ jobs:
389388
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
390389
--cluster ${{ env.CLUSTER_NAME }} \
391390
--region ${{ env.E2E_TEST_AWS_REGION }}
392-
393-
# TODO: Fix, doesn't work right now because of the following error
394-
# `serviceaccount "default/appsignals-collector" was not created by eksctl; will not be deleted`
395-
# Not a necessary piece of code anyways, service account persisting is not an issue
391+
396392
- name: Remove Application Signals Collector IAM service account
397393
if: always()
398394
continue-on-error: true
399395
run: |
400396
eksctl delete iamserviceaccount \
401-
--name appsignals-collector \
397+
--name appsignals-collector \
402398
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
403399
--cluster ${{ env.CLUSTER_NAME }} \
404400
--region ${{ env.E2E_TEST_AWS_REGION }}

validator/src/main/resources/expected-data-template/java/eks-otlp-ocb/aws-sdk-call-trace.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"name": "^S3$",
3737
"http": {
3838
"request": {
39-
"url": "^https://e2e-test-bucket-name-{{testingId}}.s3.us-west-1.amazonaws.com\\?location$",
39+
"url": "^https://e2e-test-bucket-name-{{testingId}}.s3.[a-z]+-[a-z]+-\\d.amazonaws.com\\?location$",
4040
"method": "^GET$"
4141
}
4242
},

0 commit comments

Comments
 (0)