Repository navigation
report: skip report if uncaught exception is handled - #44208
legendecas wants to merge 4 commits into
Conversation
d8e0d9f to
ecafaa4
Compare
If the exception is handled by the userland process#uncaughtException handler, reports should not be generated repetitively as the process may continue to run.
ecafaa4 to
360e9f7
Compare
|
@nodejs/diagnostics @gireeshpunathil would you mind taking a look at this PR? thank you! |
left a comment
There was a problem hiding this comment.
Hi @legendecas 👋
The only thing that makes me fear (as a newcomer in the codebase) is to guess the intention when you set process.report.directory in the test files.:
process.report.directory = <something>Maybe a comment could help? WDYT
commented
Aug 12, 2022
|
@tony-go without setting the report directory to the designated temp file directory, the report can be generated in the process's current working directory, which can vary if you run the test in different ways. Also, the temp file directory is clean up after the test is done, which can reduce the burden to manage the test generated files. |
commented
Aug 12, 2022
commented
Aug 12, 2022
|
Updated with spawning child process with cwd set to the designated temp dir and removing the assignments to |
commented
Aug 12, 2022
Thanks for the details 🙌🏼 |
| tmpdir.path, | ||
| ]); | ||
| ], { | ||
| cwd: tmpdir.path, |
|
|
@gireeshpunathil I'd find this could be categorized as a fix as I would not count handled "uncaught exception" as an uncaught event, and we don't have tests asserting that the report can be generated repetitively. However, this can be considered a breaking change as it has been there for such a long time. I've updated the document to reflect that the report is only generated when the process is exiting for uncaught exceptions, which excluded the conditions where uncaught exceptions are handled. |
commented
Aug 15, 2022
commented
Aug 16, 2022
|
Landed in 678551c. Thank you for the review! |
If the exception is handled by the userland
process#uncaughtException handler, reports should not be generated
repetitively as the process may continue to run.