-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
stream: pipeline uncaught error #28818
Conversation
dcc86f8
to
9136ca1
Compare
That sounds like an implementation problem in a userland stream. I don't know that we should cover that at risk of obscuring valid problems? |
We have it in native streams as well... |
The rule (as far as I understand) is that streams can emit errors all the way until ‘close’. ‘eos’ finishes before ‘close’. |
There is actually already a bug in eos where it doesn’t remove its error listener. So this PR doesn’t actually change any behavior until eos is fixed. |
@ronag Should this remain open? If so, is it blocked by something else? |
It should remain open and is not blocked |
/ping @nodejs/streams |
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 needs a unit test
That eos does not remove the error listener is not a bug but a feature to handle exactly this problem |
e85141d
to
31b89c3
Compare
@mcollina a unit test here won't really help since |
31b89c3
to
626289c
Compare
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.
I’m -1. This is handled by eos already, in fact this change has to disable it.
I don’t understand why this is worth considering.
626289c
to
633fffe
Compare
@mcollina Updated with unit test.
It is "magical" and also undocumented that eos handles it. I'm also of the opinion that If this PR is rejected I would at least suggest we update the documentation for |
I think the correct approach is to document it in eos. |
Sure, @lpinca do you have any opinion or should I just close this? |
Yes, exactly. |
New PR with documentation change: #28935 |
There are stream(like)s both in node and ecosystem that can emit an error after
finished/eos
. This will cause the process to unexpectedly exit with an uncaught error exception.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes