Skip to content

Remove amazon-cloudwatch delete and call APIs before remote sample app #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/appsignals-e2e-metric-limiter-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ jobs:
--region ${{ inputs.aws-region }} \
--configuration-values '{"agent":{"config":{"logs":{"metrics_collected":{"app_signals":{"limiter":{"drop_threshold":2}}}}}}}'

execute_and_retry 2 "kubectl delete pods --all -n amazon-cloudwatch"
execute_and_retry 2 "kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch"

execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 60
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 10
Expand All @@ -192,6 +190,14 @@ jobs:
sleep 10
done

# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
# Calling it here before calling the remote sample app endpoint because the API generated by it is validated
# for AllOtherRemoteOperations in the metric validation step
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"'); echo
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"')/fake-endpoint; echo
sleep 60

echo "Attempting to connect to the remote sample app endpoint"
remote_sample_app_endpoint=http://$(terraform output sample_remote_app_endpoint)/healthcheck
echo $remote_sample_app_endpoint
Expand Down Expand Up @@ -263,15 +269,6 @@ jobs:
run: echo "APP_ENDPOINT=$(terraform output sample_app_endpoint)" >> $GITHUB_ENV
working-directory: terraform/eks

# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
- name: Call healthcheck and error API to meet the metric limiter threshold
continue-on-error: true
run: |
curl -S -s http://${{ env.APP_ENDPOINT }}/; echo
curl -S -s http://${{ env.APP_ENDPOINT }}/fake-endpoint; echo
sleep 60

# This steps increases the speed of the validation by creating the telemetry data in advance
- name: Call all test APIs
continue-on-error: true
Expand Down