-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(ext/node): support createConnection option in node:http.request() #25470
fix(ext/node): support createConnection option in node:http.request() #25470
Conversation
c807b0e
to
abda518
Compare
89a4de0
to
e98525c
Compare
aedab15
to
9c1b39b
Compare
bbd15fb
to
2f9cdaa
Compare
Possibly closes #26182 |
I am also ready to test with #26735 as soon as I should. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I this released yet? |
I'd guess as it is on main you can use |
It's not released yet. please run |
#26735 fixed on canary. |
canary + Unix domain socket is not working, though, while they're working in the same node's test. Not sure why, it seem to not create socket file. |
Thanks for the feedback, I'm glad to hear that you got unblocked folks!
@StreetStrider could you open a separate issue about this one? Having a specific repro you are using would be so much helpful 🙏 |
@bartlomieju here's the repro |
works now on canary |
…#25470) This commit changes "node:http" module to add support for the "createConnection" option when the "request()" API is called. Closes #19507 --------- Signed-off-by: Yoshiya Hinosawa <[email protected]> Signed-off-by: Satya Rohith <[email protected]> Co-authored-by: Yoshiya Hinosawa <[email protected]> Co-authored-by: Bartek Iwańczuk <[email protected]> Co-authored-by: crowlkats <[email protected]>
#27639) See the comment #25470 (comment) for the reason why we do this workaround to make `make-fetch-happen` work in Deno This PR applies the same workaround to `npm-check-updates` package. `npm-check-updates` internally uses [`npm-registry-fetch`](https://www.npmjs.com/package/npm-registry-fetch) which uses [`make-fetch-happen`](https://www.npmjs.com/package/make-fetch-happen) (the problematic package) for making http request to npm registry. The detection of `make-fetch-happen` doesn't work for `npm-check-updates` because we use call stack at `net.Socket` constructor to check if it's called from `make-fetch-happen`, but `npm-check-updates` bundles its dependency and the check doesn't work. This PR adds the check of `npm-check-updates` string in call stack in net.Socket constructor to trigger the workaroud. closes #27629
I just tested Deno 2.1.5 (the first release to include the changes) but apparently this update has broken Mqtt.js (tested version 5.10.1) in some way. While I was previously getting a successful connect with Deno 2.1.4, it is now failing reproducibly with Deno 2.1.5. I have switched versions back and forth a few times to verify this. Summary:
Working in Deno 2.1.4:
I am now getting a disconnect after a very short time: Broken in Deno 2.1.5:
I have seen that it was connecting once after a few retries, but did work a lot better previously. Marius |
@mariusheil Thanks for your report! Could you share some minimal script to reproduce the issue? I'd also appreciate if you would open a new issue about that |
Hi, I have opened #27694 as a bug report. |
#27639) See the comment #25470 (comment) for the reason why we do this workaround to make `make-fetch-happen` work in Deno This PR applies the same workaround to `npm-check-updates` package. `npm-check-updates` internally uses [`npm-registry-fetch`](https://www.npmjs.com/package/npm-registry-fetch) which uses [`make-fetch-happen`](https://www.npmjs.com/package/make-fetch-happen) (the problematic package) for making http request to npm registry. The detection of `make-fetch-happen` doesn't work for `npm-check-updates` because we use call stack at `net.Socket` constructor to check if it's called from `make-fetch-happen`, but `npm-check-updates` bundles its dependency and the check doesn't work. This PR adds the check of `npm-check-updates` string in call stack in net.Socket constructor to trigger the workaroud. closes #27629
Work in progress. Feature works but breaks existing tests.
Closes #19507