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

Do not remove unhandledRejection listeners as it breaks Serverless #767

Merged

Conversation

medikoo
Copy link
Collaborator

@medikoo medikoo commented Aug 5, 2019

Removing unhandledRejection listener currently breaks exit code handling in Serverless 1.48.1+ -> serverless/serverless#6441, it technically turns off some important part of Serverless logic.

Serverless no longer forces process exit on unhandledRejection, so merging this in won't introduce a regression to #255 (which also should rather have been processed in context of serverless repo, not here)


In future Serverless may force process exit on unhandledRejection but only if there were no listeners registered for it, which is on pair with Node.js deprecation warning:

[DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Copy link
Contributor

@pmuens pmuens left a comment

Choose a reason for hiding this comment

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

LGTM!

@dnalborczyk
Copy link
Collaborator

dnalborczyk commented Aug 5, 2019

thank you @medikoo

Serverless no longer forces process exit on unhandledRejection

do you know approx. since which serverless version? offline currently has a peer-dependency on v1.39+ (because of websocket support, we have a check, but it's not enforced). just asking if we need to "up" the recommended peer dep version as well.

which also should rather have been processed in context of serverless repo, not here

probably so

@medikoo
Copy link
Collaborator Author

medikoo commented Aug 5, 2019

do you know approx. since what serverless version?

@dnalborczyk its's since v1.48.1

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.

None yet

3 participants