Skip to content

feat: Adding E2E metric test for RDS database interactions #102

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 4 commits into from
Jul 22, 2024

Conversation

jerry-shao
Copy link
Contributor

@jerry-shao jerry-shao commented Jul 2, 2024

Issue description:

The E2E test workflow now calls /mysql API which generates a SQL query to RDS database. However, we are not testing the telemetries ingested by this Agent yet.

Description of changes:

This is the first change to test telemetry ingested by Application Signals agent for SQL query interruptions.

This change calls CloudWatch Metrics for ListMetrics API and compares with the expected metric list.

E2E test workflow for us-east-1: https://github.com/jerry-shao/aws-application-signals-test-framework/actions/runs/9961505823/job/27523164038

No failure:
image


Ensure you've run the following tests on your changes and include the link below:
To do so, create a test.yml file with name: Test and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing.

NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the needs keyword to run tests in succession.

  • Run Java EKS on e2e-playground in us-east-1 and eu-central-2
  • Run Python EKS on e2e-playground in us-east-1 and eu-central-2
  • Run metric limiter on EKS cluster e2e-playground in us-east-1 and eu-central-2
  • Run EC2 tests in all regions
  • Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

georgeboc pushed a commit to georgeboc/aws-application-signals-test-framework that referenced this pull request Jul 8, 2024
…ws-observability#102)

*Issue #, if available:*
Copy workflow in
aws-observability#12
to this repository, with some additional changes.
This workflow is used in the main-build workflow.

*Description of changes:*
- Added Python EKS E2E workflow
- Main build workflow to use Python EKS E2E workflow
- Updated `artifacts_build/action.yml` to also upload staging image to
E2E test account

*Testing*:

https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/8208711023

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
@jerry-shao jerry-shao marked this pull request as ready for review July 16, 2024 17:44
Copy link
Contributor

@majanjua-amzn majanjua-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Why no log or trace validation?
  2. Can we see the test in more than one region?
  3. Some proof that the resources in the accounts that run the canary are configured in a way that will accept the same changes as these that make the test pass in your dev environment would also be great. You can use the testing instructions in the automated PR description for that, although you're on a fork so it won't work...

@jerry-shao
Copy link
Contributor Author

jerry-shao commented Jul 17, 2024

@majanjua-amzn Thanks for your review!

Why no log or trace validation?

log and trace validation will be in separate PRs. They are in draft mode at the moment, I will polish them once this one is merged.

Can we see the test in more than one region?

Em... looks like it's hard to have infra in two regions together. I may need to delete my us-east-1 stack and re-deploy to another region and modify the region-account secrets.

Some proof that the resources in the accounts that run the canary are configured in a way that will accept the same changes as these that make the test pass in your dev environment would also be great. You can use the testing instructions in the automated PR description for that, although you're on a fork so it won't work...
Yep, the testing infra mentioned in the PR description is hard for me.

The infra created in my personal account is using the CDK package to deploy a personal stack. Then I created a secret stored in secrets manager called region-account/us-east-1 and the credential is basically my dev-account so it will use my account as the ACCOUNT_ID env variable through all workflow steps. Nothing else special from my infra.

@jerry-shao
Copy link
Contributor Author

Change has been running continuously every 15 minutes for two days: https://github.com/jerry-shao/aws-application-signals-test-framework/actions?query=branch%3Amain

The missing runs were due to a known problem: docker throttling
E.g: https://github.com/jerry-shao/aws-application-signals-test-framework/actions/runs/10033641691/job/27727046487

CloudWatch metric:

image

@majanjua-amzn majanjua-amzn merged commit f2667a4 into aws-observability:main Jul 22, 2024
1 check passed
majanjua-amzn added a commit that referenced this pull request Jul 22, 2024
@jerry-shao jerry-shao deleted the e2e-tests-metric branch July 24, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants