Skip to content

Commit ae79f8c

Browse files
committed
testing pr changes
1 parent 49f9b5f commit ae79f8c

File tree

5 files changed

+41
-11
lines changed

5 files changed

+41
-11
lines changed

.github/workflows/python-ec2-default-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ env:
4949
CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }}
5050
ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }}
5151
OTEL_SOURCE: ${{ inputs.otel-source }}
52-
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app.zip
52+
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app-delete-me.zip
5353
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
5454
E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
5555
METRIC_NAMESPACE: ApplicationSignals
@@ -171,7 +171,7 @@ jobs:
171171
-var="get_adot_wheel_command=${{ env.GET_ADOT_WHEEL_COMMAND }}" \
172172
-var="language_version=${{ env.PYTHON_VERSION }}" \
173173
-var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \
174-
|| deployment_failed=$?
174+
|| deployment_failed=$?
175175
if [ $deployment_failed -eq 1 ]; then
176176
echo "Terraform deployment was unsuccessful. Will attempt to retry deployment."
177177
fi
@@ -253,7 +253,7 @@ jobs:
253253

254254
- name: Validate CWAgent metrics
255255
id: cwagent-metric-validation
256-
if: (success() || steps.log-validation.outcome == 'failure') && !cancelled()
256+
if: (success() || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled()
257257
run: ./gradlew validator:run --args='-c python/ec2/default/custom-metric-validation.yml
258258
--testing-id ${{ env.TESTING_ID }}
259259
--endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }}

.github/workflows/python-sample-app-s3-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848

4949
- name: Build Sample App Zip
5050
working-directory: sample-apps/python
51-
run: zip -r python-sample-app.zip .
51+
run: zip -r python-sample-app-delete-me.zip .
5252

5353
- name: Upload to S3
5454
working-directory: sample-apps/python
55-
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-sample-app.zip --key python-sample-app.zip
55+
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-sample-app-delete-me.zip --key python-sample-app-delete-me.zip
5656

5757
- name: Build Gen AI Sample App Zip
5858
working-directory: sample-apps/python/genai_service

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: Test
8+
on:
9+
push:
10+
branches:
11+
- otel-custom-metrics-test
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
jobs:
18+
java-ec2-default:
19+
uses: ./.github/workflows/python-ec2-default-test.yml
20+
secrets: inherit
21+
with:
22+
caller-workflow-name: 'test'
23+
aws-region: 'us-east-1'
24+
25+
custom-metrics:
26+
uses: ./.github/workflows/python-ec2-default-test.yml
27+
secrets: inherit
28+
with:
29+
caller-workflow-name: 'test'
30+
aws-region: 'us-east-1'

terraform/python/ec2/default/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ resource "null_resource" "main_service_setup" {
161161
${var.get_adot_wheel_command}
162162
163163
# Get and run the sample application with configuration
164-
aws s3 cp ${var.sample_app_zip} ./python-sample-app.zip
165-
unzip -o python-sample-app.zip
164+
aws s3 cp ${var.sample_app_zip} ./python-sample-app-delete-me.zip
165+
unzip -o python-sample-app-delete-me.zip
166166
167167
# Export environment variables for instrumentation
168168
cd ./django_frontend_service
@@ -294,8 +294,8 @@ resource "null_resource" "remote_service_setup" {
294294
${var.get_adot_wheel_command}
295295
296296
# Get and run the sample application with configuration
297-
aws s3 cp ${var.sample_app_zip} ./python-sample-app.zip
298-
unzip -o python-sample-app.zip
297+
aws s3 cp ${var.sample_app_zip} ./python-sample-app-delete-me.zip
298+
unzip -o python-sample-app-delete-me.zip
299299
300300
# Export environment variables for instrumentation
301301
cd ./django_remote_service

validator/src/main/resources/expected-data-template/python/ec2/default/aws-otel-custom-metrics.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# ANY_VALUE defines a string to = 'ANY_VALUE' to pass validation testing
33
-
44
metricName: custom_export_counter
5-
namespace: CWAgent
5+
namespace: {{metricNamespace}}
66
dimensions:
77
-
88
name: deployment.environment.name
@@ -54,7 +54,7 @@
5454
value: aws_ec2
5555
-
5656
metricName: test_histogram
57-
namespace: CWAgent
57+
namespace: {{metricNamespace}}
5858
dimensions:
5959
-
6060
name: deployment.environment.name

0 commit comments

Comments
 (0)