Skip to content

fix: errored stream is disturbed#1134

Merged
ronag merged 19 commits intomainfrom
body-error
Dec 10, 2021
Merged

fix: errored stream is disturbed#1134
ronag merged 19 commits intomainfrom
body-error

Conversation

@ronag
Copy link
Copy Markdown
Member

@ronag ronag commented Dec 8, 2021

No description provided.

Comment thread test/node-fetch/main.js
@ronag
Copy link
Copy Markdown
Member Author

ronag commented Dec 8, 2021

@szmarczak This is a spec thing. Care to help clarifying what is the correct behaviour.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 8, 2021

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.30%. Comparing base (b905cea) to head (2cc7067).
⚠️ Report is 2221 commits behind head on main.

Files with missing lines Patch % Lines
lib/fetch/index.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1134      +/-   ##
==========================================
- Coverage   94.30%   94.30%   -0.01%     
==========================================
  Files          40       40              
  Lines        3809     3808       -1     
==========================================
- Hits         3592     3591       -1     
  Misses        217      217              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ronag
Copy link
Copy Markdown
Member Author

ronag commented Dec 8, 2021

Screenshot 2021-12-08 at 21 03 30

Chrome seems to go with TypeError.

@ronag
Copy link
Copy Markdown
Member Author

ronag commented Dec 8, 2021

@jimmywarting: Any thoughts? I believe node-fetch fails with an AbortError in this test.

@ronag ronag requested a review from mcollina December 8, 2021 20:10
@jimmywarting
Copy link
Copy Markdown
Contributor

Umm. is there any wpt test or something in the spec that mention what should actually be happening?

Comment thread lib/fetch/index.js
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
@ronag ronag requested a review from mcollina December 9, 2021 09:40
ronag added a commit to nxtedition/node that referenced this pull request Dec 9, 2021
@szmarczak
Copy link
Copy Markdown
Member

Sorry for my inactivity, had a few tests and an exam in uni. Will take a look now.

Comment thread lib/core/util.js Outdated
Comment thread test/node-fetch/main.js
@szmarczak
Copy link
Copy Markdown
Member

szmarczak commented Dec 9, 2021

@jimmywarting whatwg/streams#1025 tl;dr unfortunately it's up to Node.js, because they made a design mistake to allow fetch access stream internals.

Copy link
Copy Markdown
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.

Can you please add a unit test?

@ronag
Copy link
Copy Markdown
Member Author

ronag commented Dec 9, 2021

Can you please add a unit test?

There is already unit test? I updated the relevant one.

@mcollina
Copy link
Copy Markdown
Member

I missed it. CI is failing.

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Member

@szmarczak szmarczak left a comment

Choose a reason for hiding this comment

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

Indeed, it should be TypeError 👍

@ronag ronag merged commit a3c0413 into main Dec 10, 2021
ronag added a commit to nodejs/node that referenced this pull request Dec 16, 2021
Refs: nodejs/undici#1134

PR-URL: #41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Dec 16, 2021
Refs: nodejs/undici#1134

PR-URL: #41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Dec 17, 2021
Refs: nodejs/undici#1134

PR-URL: #41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Jan 31, 2022
Refs: nodejs/undici#1134

PR-URL: #41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Linkgoron pushed a commit to Linkgoron/node that referenced this pull request Jan 31, 2022
Refs: nodejs/undici#1134

PR-URL: nodejs#41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Feb 1, 2022
Refs: nodejs/undici#1134

PR-URL: #41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
* fix: errored stream is disturbed

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
* fix: errored stream is disturbed

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup
@Uzlopak Uzlopak deleted the body-error branch February 21, 2024 12:37
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* fix: errored stream is disturbed

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants