Skip to content

stream: don't destroy on async iterator success - #35122

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:fix-35116-3
Closed

stream: don't destroy on async iterator success#35122
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:fix-35116-3

Conversation

@ronag

@ronagronag commented Sep 9, 2020

Copy link
Copy Markdown
Member

Destroying on async iterator completion ignores autoDestroy.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Sep 9, 2020
@ronag

ronag commented Sep 9, 2020

Copy link
Copy Markdown
MemberAuthor

@richardlau can you give this a try?

@mcollina

Copy link
Copy Markdown
Member

As you probably now, this needs a test.

@ronag

ronag commented Sep 9, 2020

Copy link
Copy Markdown
MemberAuthor

As you probably now, this needs a test.

Yes, building... needs another 20 min or so 😄

@richardlau

Copy link
Copy Markdown
Member

citgm got (queued): https://ci.nodejs.org/job/citgm-smoker/2464/

@ronag
ronag requested a review from mcollinaSeptember 9, 2020 14:49
@ronag

ronag commented Sep 9, 2020

Copy link
Copy Markdown
MemberAuthor

@nodejs/streams

@ronagronag added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@ronag

ronag commented Sep 9, 2020

Copy link
Copy Markdown
MemberAuthor

@richardlau Sorry can you start another one. Turns out the first version of this broke a test.

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadlib/_stream_readable.js Outdated
@richardlau

Copy link
Copy Markdown
Member

@richardlau Sorry can you start another one. Turns out the first version of this broke a test.

The job is still queued and hasn't started yet. I specified refs/pull/35122/head as the GIT_REMOTE_REF so it should pick up whatever is current when the job actually starts.

Comment threadlib/_stream_readable.js Outdated
@ronagronag added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@richardlau

Copy link
Copy Markdown
Member

got still appears to be failing with these changes 😞:
e.g. https://ci.nodejs.org/job/citgm-smoker/2464/nodes=rhel7-s390x/testReport/junit/(root)/citgm/got_v11_6_1/

in addition to the time outs there now appear to be two unhandled rejections that weren't seen in an equivalent run against master earlier today:
https://ci.nodejs.org/job/citgm-smoker/2461/nodes=rhel7-s390x/testReport/junit/(root)/citgm/got_v11_6_1/

@richardlau

Copy link
Copy Markdown
Member

My working day is drawing to a close but I'll continue to check periodically this evening. If you need to request further CITGM runs, these are the fields to set to test this PR against got:
image

@ronag

ronag commented Sep 9, 2020

Copy link
Copy Markdown
MemberAuthor

I will dig some more tonight.

@richardlau

Copy link
Copy Markdown
Member

Also if you want to run CITGM locally this is what I do:

  • Rebuild Node.js (e.g. make test)
  • Run python tools/install.py install ~/sandbox/bin/testnode '' (note the empty quotes at the end) to "install" the rebuilt Node.js into ~/sandbox/bin/testnode (replace directory name as appropriate)
  • Add ~/sandbox/bin/testnode/bin to my PATH environment variable
  • In a clone of https://github.com/nodejs/citgm run node bin/citgm got

@ronag

Copy link
Copy Markdown
MemberAuthor

@nodejs/streams this needs another review

@ronag

Copy link
Copy Markdown
MemberAuthor

@nodejs/streams

@ronag

Copy link
Copy Markdown
MemberAuthor

@nodejs/tsc Tomorrow is the cutoff for 15 and I believe it is important that this lands in 15.

@ronagronag added the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Sep 21, 2020
Destroying on async iterator completion ignores autoDestroy.
@ronag

Copy link
Copy Markdown
MemberAuthor

rebased to fix conflicts

@ronagronag added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2020
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronagronag removed the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Sep 21, 2020

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@ronagronag added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actionsgithub-actionsBot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actions

Copy link
Copy Markdown
Contributor

Landed in 2b9003b

nodejs-github-bot pushed a commit that referenced this pull request Sep 21, 2020
Destroying on async iterator completion ignores autoDestroy.
PR-URL: #35122
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

@ronag this doesn't land cleanly on v14.x, should we backport?

@ronag

Copy link
Copy Markdown
MemberAuthor

@MylesBorins there is already a different WIP PR for that.

MylesBorins pushed a commit that referenced this pull request Oct 15, 2020
includes:
* stream: simpler and faster Readable async iterator
* stream: don't destroy on async iterator success
* stream: async iterator stop read if destroyed
PR-URL: #34887
Refs: #34035
Refs: #35122
Refs: #35640
Refs: #34680
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Destroying on async iterator completion ignores autoDestroy.
PR-URL: nodejs#35122
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@ronag@mcollina@richardlau@nodejs-github-bot@szmarczak@targos@MylesBorins@jasnell@addaleax@benjamingr