Skip to content
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

feat(controller): louder UnhandledPromiseRejection log #7547

Merged
merged 1 commit into from
May 2, 2023

Conversation

turadg
Copy link
Member

@turadg turadg commented Apr 29, 2023

Description

On many occasion debugging the UnhandledPromiseRejectionWarning string gets lost in the noise of other logs.

It's a pretty serious problem that I think deserves to be called out in the logs. Especially in production. #6000 will help but it still leaves many void.

Looking for three approvals before merge, given how this affects workfow.

Security Considerations

--

Scaling Considerations

--

Documentation Considerations

--

Testing Considerations

--

@@ -75,7 +75,7 @@ function makeConsole(tagOrTagCreator) {
function unhandledRejectionHandler(e, pr) {
// Don't trigger sensitive hosts (like AVA).
pr.catch(() => {});
console.error('UnhandledPromiseRejectionWarning:', e);
console.error('🚨 UnhandledPromiseRejection:', e);
Copy link
Member Author

Choose a reason for hiding this comment

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

or maybe 📣 since it's not necessarily a problem.

alternately we can treat all failures as a problem and have an explicit catch for "expected to never happen" or "ignore failure"

Copy link
Member

Choose a reason for hiding this comment

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

🤞

@@ -75,7 +75,7 @@ function makeConsole(tagOrTagCreator) {
function unhandledRejectionHandler(e, pr) {
// Don't trigger sensitive hosts (like AVA).
pr.catch(() => {});
console.error('UnhandledPromiseRejectionWarning:', e);
console.error('🚨 UnhandledPromiseRejection:', e);
Copy link
Member

Choose a reason for hiding this comment

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

🤞

Copy link
Contributor

@ivanlei ivanlei left a comment

Choose a reason for hiding this comment

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

LGTM

@turadg turadg force-pushed the ta/louder-unhandled branch from 5059ad9 to cd67304 Compare May 2, 2023 15:11
@turadg turadg added the automerge:no-update (expert!) Automatically merge without updates label May 2, 2023
@mergify mergify bot merged commit accf926 into master May 2, 2023
@mergify mergify bot deleted the ta/louder-unhandled branch May 2, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants