Skip to content

Commit c31f916

Browse files
committed
try
1 parent 81f92f9 commit c31f916

File tree

2 files changed

+92
-5
lines changed

2 files changed

+92
-5
lines changed

.github/workflows/java-lambda-layer-perf-test-cleanup.yml

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
permissions:
3030
id-token: write
31-
contents: read
31+
contents: read
3232

3333
env:
3434
NUM_TEST_RUNS: ${{ github.event.inputs.test_runs }}
@@ -40,14 +40,101 @@ jobs:
4040
role-to-assume: arn:aws:iam::${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}:role/${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
4141
aws-region: us-east-1
4242

43+
- name: Checkout aws-otel-java-instrumentation
44+
uses: actions/checkout@v4
45+
with:
46+
repository: aws-observability/aws-otel-java-instrumentation
47+
ref: ${{ github.event.inputs.ADOT-Java-Branch }}
48+
path: aws-otel-java-instrumentation
49+
50+
- name: Log branch and commit info
51+
run: |
52+
cd aws-otel-java-instrumentation
53+
echo "ADOT Java Branch: ${{ github.event.inputs.ADOT-Java-Branch }}"
54+
echo "ADOT Java Commit Hash: $(git rev-parse HEAD)"
55+
4356
- name: Setup Terraform
4457
uses: hashicorp/setup-terraform@v2
4558

59+
# - name: Build and Deploy Lambda Layer
60+
# run: |
61+
# cd aws-otel-java-instrumentation/lambda-layer
62+
# chmod +x build-layer.sh
63+
# ./build-layer.sh
64+
65+
# LAYER_VERSION_ARN=$(aws lambda publish-layer-version \
66+
# --layer-name AWSOpenTelemetryDistroJava \
67+
# --zip-file fileb://build/distributions/aws-opentelemetry-java-layer.zip \
68+
# --compatible-runtimes "java11" "java17" "java21" \
69+
# --compatible-architectures "x86_64" "arm64" \
70+
# --query 'LayerVersionArn' \
71+
# --output text)
72+
73+
# echo "LAYER_VERSION_ARN=$LAYER_VERSION_ARN" >> $GITHUB_ENV
74+
# echo "Published layer ARN $LAYER_VERSION_ARN"
75+
76+
# - name: Build and Deploy Sample Application with Lambda Layer
77+
# run: |
78+
# cd aws-otel-java-instrumentation/sample-apps/apigateway-lambda
79+
# gradle clean build
80+
# gradle createLambdaZip
81+
82+
# cd terraform
83+
# terraform init
84+
# terraform apply -auto-approve -var "adot_layer_arn=${{ env.LAYER_VERSION_ARN }}"
85+
86+
# - name: Checkout current repository
87+
# uses: actions/checkout@v4
88+
# with:
89+
# path: current-repo
90+
91+
# - name: Run Cold Start Iterations for Base Lambda + Lambda Layer
92+
# run: |
93+
# cd current-repo
94+
# chmod +x lambda-layer-perf-test/lambda-layer-run.sh
95+
# ./lambda-layer-perf-test/lambda-layer-run.sh false aws-opentelemetry-distro-java
96+
97+
# - name: Remove Application Signals Lambda Layer
98+
# run: |
99+
# echo "Removing Lambda layer..."
100+
101+
# OUTPUT=$(aws lambda update-function-configuration \
102+
# --function-name aws-opentelemetry-distro-java \
103+
# --layers [])
104+
105+
# echo "Lambda configuration:"
106+
# echo "$OUTPUT"
107+
108+
# LAYERS=$(echo "$OUTPUT" | jq -r '.Layers | length')
109+
110+
# if [ "$LAYERS" -ne 0 ]; then
111+
# echo "::error::Found $LAYERS layer(s) still attached to the function"
112+
# echo "::error::Layer details:"
113+
# echo "$OUTPUT" | jq -r '.Layers'
114+
# exit 1
115+
# else
116+
# echo "✅ Layers successfully removed"
117+
# fi
118+
119+
# - name: Run Cold Start Iterations for Base Lambda
120+
# run: |
121+
# cd current-repo
122+
# chmod +x lambda-layer-perf-test/lambda-layer-run.sh
123+
# ./lambda-layer-perf-test/lambda-layer-run.sh true aws-opentelemetry-distro-java
124+
125+
# - name: Upload test results
126+
# uses: actions/upload-artifact@v4
127+
# with:
128+
# name: java-performance-test-results
129+
# path: |
130+
# no_layer_results.txt
131+
# layer_results.txt
132+
# retention-days: 90
133+
46134
- name: Cleanup Terraform Resources
47135
if: success() || failure() || cancelled()
48136
run: |
49137
cd aws-otel-java-instrumentation/sample-apps/apigateway-lambda/terraform
50138
echo "Starting Terraform cleanup..."
51139
terraform init
52-
terraform destroy -auto-approve
53-
140+
terraform destroy -auto-approve

.github/workflows/java-lambda-layer-perf-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
ADOT-Java-Branch:
2121
description: 'ADOT Java branch to use'
2222
required: true
23-
default: 'release/v2.11.x'
23+
default: 'perf-lambda-2.11.5'
2424
type: string
2525

2626
jobs:
@@ -81,7 +81,7 @@ jobs:
8181
8282
cd terraform
8383
terraform init
84-
terraform apply -auto-approve -var "adot_layer_arn=${{ env.LAYER_VERSION_ARN }}"
84+
terraform apply -auto-approve -var="force_recreate=true" -var "adot_layer_arn=${{ env.LAYER_VERSION_ARN }}"
8585
8686
- name: Checkout current repository
8787
uses: actions/checkout@v4

0 commit comments

Comments
 (0)