-
Notifications
You must be signed in to change notification settings - Fork 365
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
refactor: replace got with node-fetch on dev-miscellaneous.test.js #6235
refactor: replace got with node-fetch on dev-miscellaneous.test.js #6235
Conversation
📊 Benchmark resultsComparing with 51f1cf6
|
📊 Benchmark resultsComparing with 3268f29
|
For a while there looked to be several unrelated errors preventing this from getting merged, but most of those flaky tests look to have been resolved in
When I have some time again, I will try to spin this up on a local windows instance to see if I can uncover why the edge function might be returning an error in this case. |
@@ -789,7 +788,7 @@ describe.concurrent('commands/dev-miscellaneous', () => { | |||
const DETECT_FILE_CHANGE_DELAY = 500 | |||
await pause(DETECT_FILE_CHANGE_DELAY) |
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.
I played around with removing this delay and was able to uncover something potentially useful, but did not ultimately uncover the root of the problem. With no pause, we will see different results:
mac
+ node v20.12.2
+ got
-> 'Hello world'
windows
+ node v20.12.2
+ got
-> 'Hello world'
mac
+ node v20.12.2
+ fetch
-> 'Hello world'
windows
+ node v20.12.2
+ fetch
-> ECONNREFUSED
I also found this potentially related node 18 issue node-fetch/node-fetch#1624. Even though the test is failing on a different version of node, I tried changing the url in the test from localhost
to 127.0.0.1
but saw no change in behaviour.
It doesn't actually solve the underlying issue, but given the above, increasing this delay up from 500
should get the tests to pass.
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.
To be clear, the changes in this PR do not introduce an issue (as they are just modifying a test), they simply bring to light an issue that exists somewhere in our codebase. Some interaction between some or all of the following components: edge proxy
, fetch
, builder
(on windows)
Summary
refactor: replace got with node-fetch on dev-miscellaneous.test.js
related to #5695
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)