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

remove third party everything support in fetch #3502

Merged
merged 12 commits into from
Aug 27, 2024

Conversation

KhafraDev
Copy link
Member

Third party Blob, FormData, and AbortController in fetch should never have landed. Even after it did, there was never any documentation on it - the only evidence that this was a feature was in tests and a few comments on issues.

Support is so bad, currently, in fact, that webidl skips validation entirely. Take webidl.converters.Blob for example: it's an interface converter (ie. validating that an object is an instance of a class), but when passed the strict: false option, it wouldn't perform any validation.

I understand that support was added for performance reasons, but it's something that we should have let node core fix, rather than "node-ifying" the spec. For use cases that are not possible with fetch, we should start recommending undici directly.

@KhafraDev KhafraDev added the semver-major Features or fixes that will be included in the next semver major release label Aug 24, 2024
@KhafraDev
Copy link
Member Author

Node v22.7.0 broke some of the autobahn tests, confirmed it locally. When running in v22.6.0, all the tests pass. It wasn't caught because the autobahn suite only runs when changes to lib/web/websocket are made. @Uzlopak

@KhafraDev
Copy link
Member Author

KhafraDev commented Aug 24, 2024

It's probably the buffer bugs, thinking about it. I'm almost certain it's nodejs/node#54521 because the failing tests send strings, which are converted to a buffer with Buffer.from. They also send thousands of messages which would make them optimize.

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 27, 2024

@KhafraDev
can you look at #3503 to avoid something similar in the future?

@@ -400,16 +400,6 @@ class Request {

// 29. If signal is not null, then make this’s signal follow signal.
if (signal != null) {
if (
Copy link
Member Author

Choose a reason for hiding this comment

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

this is no longer needed because we are actually validating signal in webidl now

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM

@KhafraDev KhafraDev merged commit de0424f into nodejs:main Aug 27, 2024
32 of 33 checks passed
@KhafraDev KhafraDev deleted the remove-third-party-everything branch August 27, 2024 16:07
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
@github-actions github-actions bot mentioned this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Features or fixes that will be included in the next semver major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants