Skip to content

Commit 0e48219

Browse files
authored
Merge pull request #56 from aws-observability/fix-metric-limiter
Remove amazon-cloudwatch delete and call APIs before remote sample app
2 parents 97cde8e + 0d52101 commit 0e48219

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/appsignals-e2e-metric-limiter-test.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ jobs:
170170
--region ${{ inputs.aws-region }} \
171171
--configuration-values '{"agent":{"config":{"logs":{"metrics_collected":{"app_signals":{"limiter":{"drop_threshold":2}}}}}}}'
172172
173-
execute_and_retry 2 "kubectl delete pods --all -n amazon-cloudwatch"
174-
execute_and_retry 2 "kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch"
175173
176174
execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 60
177175
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 10
@@ -192,6 +190,14 @@ jobs:
192190
sleep 10
193191
done
194192
193+
# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
194+
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
195+
# Calling it here before calling the remote sample app endpoint because the API generated by it is validated
196+
# for AllOtherRemoteOperations in the metric validation step
197+
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"'); echo
198+
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"')/fake-endpoint; echo
199+
sleep 60
200+
195201
echo "Attempting to connect to the remote sample app endpoint"
196202
remote_sample_app_endpoint=http://$(terraform output sample_remote_app_endpoint)/healthcheck
197203
echo $remote_sample_app_endpoint
@@ -263,15 +269,6 @@ jobs:
263269
run: echo "APP_ENDPOINT=$(terraform output sample_app_endpoint)" >> $GITHUB_ENV
264270
working-directory: terraform/eks
265271

266-
# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
267-
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
268-
- name: Call healthcheck and error API to meet the metric limiter threshold
269-
continue-on-error: true
270-
run: |
271-
curl -S -s http://${{ env.APP_ENDPOINT }}/; echo
272-
curl -S -s http://${{ env.APP_ENDPOINT }}/fake-endpoint; echo
273-
sleep 60
274-
275272
# This steps increases the speed of the validation by creating the telemetry data in advance
276273
- name: Call all test APIs
277274
continue-on-error: true

0 commit comments

Comments
 (0)