-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(toolkit): introduce cloudwatchlogsmonitor to deploy and watch #33219
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33219 +/- ##
=======================================
Coverage 80.84% 80.84%
=======================================
Files 232 232
Lines 14135 14135
Branches 2460 2460
=======================================
Hits 11428 11428
Misses 2427 2427
Partials 280 280
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| * | ||
| * @default - not monitoring CloudWatch logs | ||
| */ | ||
| readonly cloudWatchLogMonitor?: CloudWatchLogEventMonitor; |
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.
Do we really want to make this a public interface? What is the benefit of providing this as a customizable class?
Or would be better off turning this into a boolean option streamLogs?: boolean?
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.
If we do want this as a public interface, it will have to be an ICloudWatchLogEventMonitor etc.
| * | ||
| * @default - not monitoring CloudWatch logs | ||
| */ | ||
| readonly cloudWatchLogMonitor?: CloudWatchLogEventMonitor; |
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.
If we do want this as a public interface, it will have to be an ICloudWatchLogEventMonitor etc.
| * | ||
| * @default - not monitoring CloudWatch logs | ||
| */ | ||
| readonly cloudWatchLogMonitor?: CloudWatchLogEventMonitor; |
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.
this is under ExtendedDeployOptions which is only used by watch and not used by customers. therefore i think it's fine/appropriate for it to be typed CloudWatchLogEventMonitor without the I because it is meant to always be the CloudWatchLogEventMonitor class.
| * Whether to show logs from all CloudWatch log groups in the template | ||
| * locally in the users terminal |
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.
Not sure what, but the Toolkit doesn't really have a concept of a user terminal. It works with the IoHost instead (which or might not print).
I realize we copied this description from elsewhere. But hey, let's make it better now!
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.
good call out
| export { findCloudWatchLogGroups } from '../../../../aws-cdk/lib/api/logs/find-cloudwatch-logs'; | ||
|
|
||
| // Test APIs | ||
| export { MockSdk } from '../../../../aws-cdk/test/util/mock-sdk'; |
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.
Okay that import needs to go elsewhere. Apologies, I didn't explain the purpose of this file well enough.
Basically we are using it as bundling entrypoint. Everything in here will be bundled for distribution. We don't need to MockSdk bundled.
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.
your linter rule pointed me here :). but i'll make an exception for testing imports in that rule
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.
Approved in principle. We mainly need to fix the MockSdk import.
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.
do-not-merge so you can do the fixups
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
This pull request has been removed from the queue for the following reason: Pull request #33219 has been dequeued. The pull request rule doesn't match anymore You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
|
@Mergifyio requeue |
❌ This pull request head commit has not been previously disembarked from queue. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #.
Reason for this change
Description of changes
Describe any new or updated permissions being added
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license