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

stream: fix fromAsyncGen #40499

Closed
wants to merge 1 commit into from
Closed

stream: fix fromAsyncGen #40499

wants to merge 1 commit into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Oct 18, 2021

Fixes: #40497

The problem here is that the resolve does not get updated before yielding control back to the user, hence the user might call the wrong resolve and hang the pipeline.

@ronag ronag added stream Issues and PRs related to the stream subsystem. v16.x labels Oct 18, 2021
@ronag ronag requested a review from mcollina October 18, 2021 10:09
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 18, 2021
@ronag
Copy link
Member Author

ronag commented Oct 18, 2021

@nodejs/streams

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. and removed needs-ci PRs that need a full CI run. labels Oct 18, 2021
@ronag ronag requested a review from lpinca October 18, 2021 10:19
@ronag
Copy link
Member Author

ronag commented Oct 18, 2021

Credit to @kmamal for making me aware of this issue and writing a repro.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2021
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Oct 18, 2021

@ronag
Copy link
Member Author

ronag commented Oct 19, 2021

@benjamingr @lpinca @jasnell would appreciate another review here so we can land it in the next release.

@ronag
Copy link
Member Author

ronag commented Oct 19, 2021

Can we fast-track this so it can be included in 16.12 #40504 (comment)

@ronag ronag added the fast-track PRs that do not need to wait for 48 hours to land. label Oct 19, 2021
@github-actions
Copy link
Contributor

Fast-track has been requested by @ronag. Please 👍 to approve.

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 19, 2021
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 19, 2021
@github-actions
Copy link
Contributor

Landed in 2bed031...0f78d26

@github-actions github-actions bot closed this Oct 19, 2021
nodejs-github-bot pushed a commit that referenced this pull request Oct 19, 2021
Fixes: #40497

PR-URL: #40499
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
richardlau pushed a commit that referenced this pull request Oct 19, 2021
Fixes: #40497

PR-URL: #40499
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this pull request Oct 20, 2021
Fixes: #40497

PR-URL: #40499
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos added a commit that referenced this pull request Oct 20, 2021
Notable changes:

Fixed distribution for native addon builds

This release fixes an issue introduced in Node.js v17.0.0, where some V8
headers were missing from the distributed tarball, making it impossible
to build native addons. These headers are now included.
#40526

Fixed stream issues
* Fixed a regression in `stream.promises.pipeline`, which was introduced
  in version 16.10.0, is fixed. It is now possible again to pass an
  array of streams to the function.
  #40193
* Fixed a bug in `stream.Duplex.from`, which didn't work properly when
  an async generator function was passed to it.
  #40499

PR-URL: #40535
targos added a commit that referenced this pull request Oct 20, 2021
Notable changes:

Fixed distribution for native addon builds

This release fixes an issue introduced in Node.js v17.0.0, where some V8
headers were missing from the distributed tarball, making it impossible
to build native addons. These headers are now included.
#40526

Fixed stream issues
* Fixed a regression in `stream.promises.pipeline`, which was introduced
  in version 16.10.0, is fixed. It is now possible again to pass an
  array of streams to the function.
  #40193
* Fixed a bug in `stream.Duplex.from`, which didn't work properly when
  an async generator function was passed to it.
  #40499

PR-URL: #40535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplex.from failure
5 participants