Skip to content

stream: enable usage of webstreams on compose() - #46675

Merged
nodejs-github-bot merged 12 commits into
nodejs:mainfrom
debadree25:ft/compose-webstreams
Feb 27, 2023
Merged

stream: enable usage of webstreams on compose()#46675
nodejs-github-bot merged 12 commits into
nodejs:mainfrom
debadree25:ft/compose-webstreams

Conversation

@debadree25

@debadree25debadree25 commented Feb 15, 2023

Copy link
Copy Markdown
Contributor

The final one in the series

Refs: #39316

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Feb 15, 2023
@debadree25

Copy link
Copy Markdown
ContributorAuthor

ping @ronag

} else {
onclose = callback;
if (isNodeStream(tail)) {
destroyer(tail, err);

@debadree25debadree25Feb 16, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Some help is needed here, how could we destroy webstreams here? or should we even?

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.

Can you elaborate on the question? (We can destroy web streams the question is what scenario do you specifically mean)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

When the pipeline encounters an error, it would call d.destroy, which in turn would destroy the last stream in the series the tail stream should the same happen for webstreams too I think we could do writableStream.abort() here.

Actually, i am a little confused why destroying the last stream is necessary 😅

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This one question remain wdyt @benjamingr ?

@debadree25debadree25 changed the title streams: enable usage of webstreams on compose()stream: enable usage of webstreams on compose()Feb 16, 2023
@debadree25

Copy link
Copy Markdown
ContributorAuthor

Added tests and doc opening for review

@debadree25
debadree25 marked this pull request as ready for review February 16, 2023 17:12
@debadree25
debadree25 marked this pull request as draft February 16, 2023 17:16
@debadree25
debadree25 marked this pull request as ready for review February 16, 2023 18:23
Comment threadtest/parallel/test-webstreams-compose.js Outdated

@ronagronag 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.

This is quite complicated. Can you please make this as easy to review as possible, i.e. avoid any unnecessary changes and make the diff as small as possible, e.g. don't rename d to duplex.

@debadree25

Copy link
Copy Markdown
ContributorAuthor

Simplified the diff, and removed the unnecessary functions could you check @ronag

@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

@benjamingrbenjamingr 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.

Looks good, left a few comments that are non-blocking for now but I'd like addressed

Comment threadlib/internal/streams/compose.js
Comment threadlib/internal/streams/compose.js Outdated
Comment threadlib/internal/streams/compose.js Outdated
@nodejs-github-bot

This comment was marked as off-topic.

@nodejs-github-bot

This comment was marked as outdated.

@ronagronag 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.

I need some time to review this

@debadree25

Copy link
Copy Markdown
ContributorAuthor

No problem!

@debadree25debadree25 added stream Issues and PRs related to the stream subsystem. web streams request-ci Add this label to start a Jenkins CI on a PR. labels Feb 22, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 26, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@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

@mcollinamcollina added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-ci PRs that need a full CI run. labels Feb 27, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 27, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 94e1f8f into nodejs:mainFeb 27, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 94e1f8f

@debadree25

Copy link
Copy Markdown
ContributorAuthor

I think we can close #39316 now

implemented:

  • finished
  • pipeline
  • compose
  • addAbortSignal

debadree25 added a commit to debadree25/node that referenced this pull request Feb 27, 2023
Refs: nodejs#39316
PR-URL: nodejs#46675
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Mar 13, 2023
Refs: #39316
PR-URL: #46675
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Mar 14, 2023
Refs: #39316
PR-URL: #46675
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Mar 14, 2023
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
Refs: #39316
PR-URL: #46675
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.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

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.

6 participants

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