-
Notifications
You must be signed in to change notification settings - Fork 0
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
[NR-347440] CFN template validate lambda integration logs #17
base: develop
Are you sure you want to change the base?
Conversation
exit_with_error "Log event with $attribute_key: $attribute_value not found in New Relic. Error Received: $response" | ||
} | ||
|
||
validate_logs_not_present() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate_logs_in_new_relic() and validate_logs_not_present() have common code, can be refactored to one method with a flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in one method you are trying exponential backoff while in other it's simple retry, should have uniformity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hrai-nr here it's retrying to check that logs should NOT get sent to new relic. Hence extended retry is not required in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @hrai-nr about being consistent with retry strategy here.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are looking fine, but code to send notification to slack channel is missing, please add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demo to team.
@@ -7,12 +7,51 @@ on: | |||
- main | |||
|
|||
jobs: | |||
run-e2e-tests: | |||
run-e2e-tests-cloudwatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it going to run in parallel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, all tests will run in parallel
cd .. | ||
./lambda-s3-trigger.sh ${{ matrix.test-case }} | ||
|
||
clean-up: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are we doing in cleanup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleaning out templates s3 bucket, template artifacts and templates will be removed
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | ||
run: | | ||
cd e2e-tests/common-scripts | ||
./build-templates.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are building multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but since all the tests run in parallel it's going to take the same time as first building and passing build artifacts to parallel running test jobs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know what you think
.github/workflows/run-e2e-tests.yaml
Outdated
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Install AWS SAM CLI | ||
run: | | ||
pip install aws-sam-cli | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_E2E_ROLE }} | ||
aws-region: us-east-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to avoid repeating common steps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maya-jha but these are required steps in both the test jobs. I cannot add them as a common step and re-use. If you want it specifically in any way let me know.
exit_with_error "Log event with $attribute_key: $attribute_value not found in New Relic. Error Received: $response" | ||
} | ||
|
||
validate_logs_not_present() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @hrai-nr about being consistent with retry strategy here.
As part of this pr:
Create events in lambda from s3 and cloudwatch
Validate that logs are getting populated in New Relic on event creation.
Create scripts to fetch and validate logs in New Relic.