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: don't destroy on async iterator success #35122

Closed
wants to merge 1 commit into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Sep 9, 2020

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-bot nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Sep 9, 2020
@ronag
Copy link
Member Author

ronag commented Sep 9, 2020

@richardlau can you give this a try?

@mcollina
Copy link
Member

mcollina commented Sep 9, 2020

As you probably now, this needs a test.

@ronag
Copy link
Member Author

ronag commented Sep 9, 2020

As you probably now, this needs a test.

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

@richardlau
Copy link
Member

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

@ronag ronag requested a review from mcollina September 9, 2020 14:49
@ronag
Copy link
Member Author

ronag commented Sep 9, 2020

@nodejs/streams

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

ronag commented Sep 9, 2020

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

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

lib/_stream_readable.js Outdated Show resolved Hide resolved
@richardlau
Copy link
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.

lib/_stream_readable.js Outdated Show resolved Hide resolved
@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
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

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

@richardlau
Copy link
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
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
Copy link
Member Author

ronag commented Sep 9, 2020

I will dig some more tonight.

@richardlau
Copy link
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
Member Author

ronag commented Sep 12, 2020

@nodejs/streams this needs another review

@ronag
Copy link
Member Author

ronag commented Sep 17, 2020

@nodejs/streams

@ronag
Copy link
Member Author

ronag commented Sep 21, 2020

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

@ronag ronag 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
Member Author

ronag commented Sep 21, 2020

rebased to fix conflicts

@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2020
@nodejs-github-bot
Copy link
Collaborator

@ronag ronag removed the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Sep 21, 2020
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 the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actions
Copy link
Contributor

Landed in 2b9003b

@github-actions github-actions bot closed this Sep 21, 2020
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
Contributor

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

@ronag
Copy link
Member Author

ronag commented Sep 24, 2020

@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 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. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants