-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Undocumented breaking change in stream.pipeline? #33050
Comments
I think we have another undocumented semver-major change like #32987 |
@himself65 how is that related to streams? |
@aduh95 Do you think you could provide a full example on how to reproduce? |
Absolutely not, I just thought this's maybe an undocumented update issue like that one. Because the commit 1428a92 which author mentioned to only release in V14 |
FYI, I've moved the conversation to max-mapper/extract-zip#94 for now until I know how to reproduce the issue. |
I had a similar issue with another zip extracting library. I can try to make a repro. |
Thanks. I'm struggling to make it fail. So far all my tries succeed. |
@ronag see https://github.com/targos/bug-zip-pipeline Expected: Actual:
Edit: If pipeline is replaced with manual pipe + |
Yes, I can confirm it is still a problem. I am also able to reproduce using @targos repo: $ npm install
$ ../node/out/Release/node --version
v15.0.0-pre
$ ../node/out/Release/node test.js
start reading zip file
$ node13 --version
v13.13.0
$ node13 test.js
(node:53994) ExperimentalWarning: The ESM module loader is experimental.
start reading zip file
finished reading zip file |
The problem seems to be that the read stream never emits a |
So the problem goes back to https://github.com/andrewrk/node-fd-slicer/blob/master/index.js#L102 At the moment I'm a little unsure how to fix this without basically to large degree disabling the |
Neither |
/cc @mafintosh @mcollina |
Try to detect non standard streams and don't wait for 'close' on these. In particular if we detected that destroyed is true before we expect it to be then fallback to compat behavior. Fixes: nodejs#33050
I think this should fix it, #33058 |
@ronag could you also send a PR that list the semver-major changes to the history of pipeline/finished etc? |
This comment has been minimized.
This comment has been minimized.
Try to detect non standard streams and don't wait for 'close' on these. In particular if we detected that destroyed is true before we expect it to be then fallback to compat behavior. Fixes: #33050 PR-URL: #33058 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
Try to detect non standard streams and don't wait for 'close' on these. In particular if we detected that destroyed is true before we expect it to be then fallback to compat behavior. Fixes: #33050 PR-URL: #33058 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
Try to detect non standard streams and don't wait for 'close' on these. In particular if we detected that destroyed is true before we expect it to be then fallback to compat behavior. Fixes: #33050 PR-URL: #33058 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
Can anyone confirm if this issue is fixed? File uploads still fail with a simple app with connect-multiparty. expressjs/connect-multiparty#29 |
I can confirm it is fixed on Node.js 14.1.0, I haven't tested the app you referenced though. |
14.3 and multi-party is still broken tbh fam |
here is my minimal bug reproduction https://github.com/exe-dealer/node-iss-33050 |
What steps will reproduce the bug?
It seems Node.js 14 introduced a breaking change in the
stream.pipeline
API, however the docs doesn't reference any change related to Node 14.Refs: max-mapper/extract-zip#94
TLDR of the above issue is that sometimes the promisified version of pipeline never resolves, causing the program to hang or to exit with unfinished promises.
How often does it reproduce? Is there a required condition?
I have a limited knowledge of the Node.js Stream API, I haven't been able to isolate the bug in the issue I referenced above.
What is the expected behavior?
If there is a breaking change on Node.js 14, it should be documented, at least in the YAML metadata.
Ideally there would be a migration guide to workaround the breaking change.
What do you see instead?
Last documented change references 13.10.0.
Additional information
Probably related to #32158.
CC: @ronag
The text was updated successfully, but these errors were encountered: