Skip to content

Conversation

@debadree25
Copy link
Member

Added support to using pipeline() for webstreams and added tests for both webstreams and mixture of node streams and webstreams with pipeline

Refs: #39316

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 22, 2023
Copy link
Member

@ronagronag left a comment

Choose a reason for hiding this comment

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

I would prefer if we could avoid transforming into node stream

@debadree25
Copy link
MemberAuthor

I would prefer if we could avoid transforming into node stream

Any suggestion what alternative you would prefer?

@ronag
Copy link
Member

I would prefer if we could avoid transforming into node stream

Any suggestion what alternative you would prefer?

What I wrote 😄. We don't convert generators to streams. Instead we have a custom function pumping.

@debadree25
Copy link
MemberAuthor

I would prefer if we could avoid transforming into node stream

Any suggestion what alternative you would prefer?

What I wrote 😄. We don't convert generators to streams. Instead we have a custom function pumping.

Ah ok yes 😅😅, I think could try using pipeThrough of readable streams, converting the PR to draft

@debadree25debadree25 marked this pull request as draft January 22, 2023 14:03
@debadree25
Copy link
MemberAuthor

Ok this requires some work closing this for now will reopen with fresh version 😅😅

@debadree25
Copy link
MemberAuthor

Hi @ronag we are in an interesting position in regards to this PR turns out pipeline already supports webstreams due to #46307 since the pipeline is converting streams to duplexes and duplex now supports webstreams, except it breaks if transform streams are added in between, so I am thinking could do two things

  1. If the pipeline consists entirely of webstreams we could ensure that webstream native methods like pipeThrough, pipeTo is used
  2. If there is interop between webstreams and node streams we could allow this Duplex interop to continue?

would this be an acceptable path?

@debadree25
Copy link
MemberAuthor

debadree25 commented Jan 25, 2023

Hello, have updated the code, 3 tests are failing which shall fix in a while but generally have updated to not convert everything to nodestreams 😅😅, could you please take a look again @ronag if the general direction seems to be correct?

@ronag
Copy link
Member

Just took a very quick look but it seems to be right general direction.

@debadree25debadree25 marked this pull request as ready for review January 26, 2023 14:49
@debadree25debadree25 marked this pull request as draft January 26, 2023 14:49
@debadree25
Copy link
MemberAuthor

Reopening for review all the tests passing!

@debadree25debadree25 marked this pull request as ready for review January 26, 2023 16:10
@debadree25debadree25 requested a review from ronagJanuary 26, 2023 16:10
Copy link
Member

@ronagronag left a comment

Choose a reason for hiding this comment

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

I would make two separate pump functions.

@debadree25
Copy link
MemberAuthor

Ok refactoring

@debadree25
Copy link
MemberAuthor

I would make two separate pump functions.

The code would be duplicated no?

@debadree25
Copy link
MemberAuthor

Have updated to use a separate function

@debadree25debadree25 requested a review from ronagJanuary 26, 2023 18:48
Copy link
Member

@ronagronag left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollinamcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2023
@nodejs-github-bot
Copy link
Collaborator

});
constws=newWritableStream({
write(chunk){
values.push(chunk?.toString());
Copy link
Member

Choose a reason for hiding this comment

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

Nit: since the test is only pushing strings through, perhaps just simply values.push(chunk) ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

sure updating

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Fixed

@ronagronag added stream Issues and PRs related to the stream subsystem. 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. web streams and removed needs-ci PRs that need a full CI run. labels Jan 30, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2023
@nodejs-github-bot
Copy link
Collaborator

@lpincalpinca added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. commit-queue Add this label to land a pull request using GitHub Actions. labels Feb 2, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 2, 2023
@nodejs-github-botnodejs-github-bot merged commit 23effb2 into nodejs:mainFeb 2, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 23effb2

@debadree25
Copy link
MemberAuthor

This one had taken quite some trial and error!
Thank you to all reviewers for your time and patience!

MylesBorins pushed a commit that referenced this pull request Feb 18, 2023
Refs: #39316 PR-URL: #46307 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Feb 19, 2023
debadree25 added a commit to debadree25/node that referenced this pull request Feb 27, 2023
Refs: nodejs#39316 PR-URL: nodejs#46307 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
debadree25 added a commit to debadree25/node that referenced this pull request Feb 27, 2023
Refs: nodejs#39316 PR-URL: nodejs#46307 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
Refs: #39316 PR-URL: #46307 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
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.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.streamIssues and PRs related to the stream subsystem.web streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@debadree25@nodejs-github-bot@ronag@mcollina@jasnell@benjamingr@lpinca