-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
promise: emit error on domain unhandled rejections #36082
promise: emit error on domain unhandled rejections #36082
Conversation
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.
Awesome work!
@@ -266,10 +273,9 @@ function generateUnhandledRejectionError(reason) { | |||
function listenForRejections() { | |||
setPromiseRejectCallback(promiseRejectHandler); | |||
} | |||
|
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 line probably shouldn’t be deleted.
@@ -117,7 +117,8 @@ function unhandledRejection(promise, reason) { | |||
maybeUnhandledPromises.set(promise, { | |||
reason, | |||
uid: ++lastPromiseId, | |||
warned: false | |||
warned: false, | |||
domain: process.domain |
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.
Since this PR is adding trailing commas to module.exports = {…}
, it should probably also add them here:
domain: process.domain | |
domain: process.domain, |
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 don't actually enforce (or particularly care) about trailing commas I believe?
I believe that if we do we should enforce it through eslint.
Commit Queue failed- Loading data for nodejs/node/pull/36082 ✔ Done loading data for nodejs/node/pull/36082 ----------------------------------- PR info ------------------------------------ Title promise: emit error on domain unhandled rejections (#36082) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch benjamingr:domain-unhandled-rejection-promise -> nodejs:master Labels domain, process, promises, repl Commits 3 - promise: emit error on domain unhandled rejections - fixup! behaviour change, remove test for old behaviour - fixup! linter Committers 1 - Benjamin Gruenbaum PR-URL: https://github.com/nodejs/node/pull/36082 Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/36082 Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott -------------------------------------------------------------------------------- ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-11-12T11:58:53Z: https://ci.nodejs.org/job/node-test-pull-request/34362/ - Querying data for job/node-test-pull-request/34362/ ✔ Build data downloaded ✔ Last Jenkins CI successful ℹ This PR was created on Wed, 11 Nov 2020 12:53:39 GMT ✔ Approvals: 3 ✔ - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/36082#pullrequestreview-528154304 ✔ - Yongsheng Zhang (@ZYSzys): https://github.com/nodejs/node/pull/36082#pullrequestreview-528159397 ✔ - Rich Trott (@Trott) (TSC): https://github.com/nodejs/node/pull/36082#pullrequestreview-529098695 -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/master up to date... From https://github.com/nodejs/node * branch master -> FETCH_HEAD ✔ origin/master is now up-to-date - Downloading patch for 36082 From https://github.com/nodejs/node * branch refs/pull/36082/merge -> FETCH_HEAD ✔ Fetched commits as 2fd22353ea1a..f234181e18da -------------------------------------------------------------------------------- [master ccad277770] promise: emit error on domain unhandled rejections Author: Benjamin Gruenbaum Date: Wed Nov 11 14:52:07 2020 +0200 2 files changed, 24 insertions(+), 8 deletions(-) [master ea8f10ba73] fixup! behaviour change, remove test for old behaviour Author: Benjamin Gruenbaum Date: Wed Nov 11 16:00:00 2020 +0200 1 file changed, 24 deletions(-) [master 5b471c6ed2] fixup! linter Author: Benjamin Gruenbaum Date: Wed Nov 11 16:26:43 2020 +0200 1 file changed, 1 deletion(-) ✔ Patches applied There are 3 commits in the PR. Attempting autorebase. Rebasing (2/6) Commit Queue action: https://github.com/nodejs/node/actions/runs/365652327 |
Ok, TIL commit queue doesn't squash 😅 I'll land manually Edit: landed (cleanly) with NCU in cd31340 |
PR-URL: #36082 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Commit queue squashes if you use the standard |
@targos I did use fixup! in the commit message, see output here: #36082 (comment) |
It's not just fixup!. The text after it must be exactly the same as the title of the commit that your are fixing. This is what git automatically generates if you run |
@benjamingr For FWIW the reason #36082 (comment) failed was not the autosquash -- |
Thanks @targos @richardlau, I didn't know that or autosquash! I just assumed the |
PR-URL: #36082 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This lands cleanly on v14.x-staging but the test fails:
|
@targos yes, the test is rightfully failing and should be removed since this is specifically a behaviour change that breaks the test. |
Fixes #35232
Thanks for the help and guidance with this @addaleax
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes