You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#87 - Alarming construct to streamline alarming setup - #88
Date#setTime returns the numeric epoch in milliseconds, so each Slack log entry displays a value such as 1700000000001 instead of a readable event time. Format the date value before embedding it.
Both branches call JSON.parse without the fallback promised above. Any non-JSON message matched by a custom subscription filter aborts the entire CloudWatch Logs batch, so the documented “any other format still works” behavior does not work; preserve the raw text when parsing fails.
Classify standard Lambda module-load failures correctly
The standard Lambda module-load failures contain Runtime.ImportModuleError and/or Cannot find module; they do not contain “missing on module”. As a result, these failures fall through to the general classifier and are mislabeled instead of being reported as configuration errors.
@dario-fazio : I reviewed the esbuild setup and added a small optimisation to reduce the Lambda bundle size. I haven’t checked if the potential issues flagged by Copilot are valid. Otherwise it looks good to me.
Date#setTime returns the epoch value as a number, so Slack displays values such as 1700000000001 instead of a readable event time. Format the constructed date rather than interpolating the setter's return value.
This issue also appears on line 188 of the same file.
A non-JSON event makes JSON.parse throw and fails the entire CloudWatch Logs batch, despite this handler and its documentation supporting plaintext/custom filter patterns. Fall back to the raw log message when parsing fails so one event cannot block every notification in the batch.
Missing-dependency errors are not classified as configuration errors
This phrase does not match Lambda's missing-dependency errors (Runtime.ImportModuleError: Cannot find module/package ...), so those events are classified only as generic errors rather than configuration errors. Match the actual runtime messages.
this.publishErrorLogsToSlackFunction.functionArn remains a token owned by the construct stack; importing that token into scope still creates the export/import coupling this code says it avoids. Use an ARN built from a retained stable function name and environment, or keep the direct reference and document the dependency.
Format event timestamps instead of returning epoch numbers
Date#setTime returns the epoch millisecond number, so Slack receives values such as 1700000000000 rather than a readable event time. Format the constructed date instead.
This issue also appears in the following locations of the same file:
line 189
line 194
Handle CloudWatch control messages and empty logEvents
CloudWatch Logs can send CONTROL_MESSAGE payloads without data events to verify the destination. Calling .map unconditionally makes that invocation fail and retry; return successfully for control messages or an absent/empty logEvents array.
This issue also appears in the following locations of the same file:
One or more custom setup steps configured for this repository failed during this Copilot code review run:
GitHub registry Auth & Install Dependencies
Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.
Note
You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unbounded log enrichment can exhaust the notification Lambda’s 30-second timeout before the alarm reaches Slack, allowing optional context gathering to prevent alarm delivery.
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
One or more custom setup steps configured for this repository failed during this Copilot code review run:
GitHub registry Auth & Install Dependencies
Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.
Note
You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.
One or more custom setup steps configured for this repository failed during this Copilot code review run:
GitHub registry Auth & Install Dependencies
Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.
Note
You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
A missing Lambda permission dependency can break initial deployments, while unresolved log filtering and delivery issues can omit error context or prevent Slack notifications.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved lint violations and an undefined logger filter that fails a new test remain, alongside error-detection and delivery flaws that can omit or duplicate Slack notifications.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unresolved issues discard structured error details, risk failed or duplicate Slack alerts under rate limits, and can break configuration or deployment through construct-ID collisions and missing Lambda dependencies.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Per-log-group permissions lack a dependency on the actual notification Lambda, allowing CloudFormation to create them too early and fail fresh deployments with function-not-found errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.