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

Fix: Change dns resolution order to ipv4 in BFF server #4836

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

liady
Copy link
Contributor

@liady liady commented Feb 5, 2024

Problem:
In Node > 17, the default dns resolution is ipv6, which maps localhost to ::1, and breaks the proxy.

Fix:
Setting the default dns resolving to ipv4 (the other workaround is to aloways call 127.0.0.1, but that's a more robust fix)

@liady liady changed the title Fix: Change dns resolution order to ipv4 inBFF server Fix: Change dns resolution order to ipv4 in BFF server Feb 5, 2024
Copy link
Contributor

github-actions bot commented Feb 5, 2024

Try me

Copy link

relativeci bot commented Feb 5, 2024

Job #10228: Bundle Size — 62.35MiB (~-0.01%).

8b6ea6c(current) vs 794431b master#10224(baseline)

Warning

Bundle contains 66 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #10228
     Baseline
Job #10224
Regression  Initial JS 35.39MiB(~+0.01%) 35.39MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 20.23% 21.77%
No change  Chunks 28 28
No change  Assets 32 32
No change  Modules 4407 4407
No change  Duplicate Modules 490 490
No change  Duplicate Code 30.7% 30.7%
No change  Packages 462 462
No change  Duplicate Packages 65 65
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
Job #10228
     Baseline
Job #10224
Regression  JS 62.34MiB (~+0.01%) 62.34MiB
Improvement  HTML 11.37KiB (-0.32%) 11.41KiB

View job #10228 reportView fix/dns-fetch branch activityView project dashboard


// this is a workaround for default DNS resolution order with Node > 17 (where ipv6 is first)
// https://github.com/node-fetch/node-fetch/issues/1624#issuecomment-1235826631
dns.setDefaultResultOrder("ipv4first");
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this only be true when running locally?

Copy link
Contributor

@Rheeseyb Rheeseyb left a comment

Choose a reason for hiding this comment

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

I'm approving this to unblock, but we need to track this hack and if possible wrap it in a check to see if this is running locally

@liady liady merged commit 7a77bf7 into master Feb 5, 2024
18 checks passed
@liady liady deleted the fix/dns-fetch branch February 5, 2024 15:14
Copy link
Contributor

github-actions bot commented Feb 5, 2024

Performance test results:
Highlight Regular (8%)
Before: 5.1ms (4.5-45.2ms)
After: 5.5ms (4.5-51.2ms)

Highlight All Elements (1%)

Selection (0%)

De-Selection (2%)

Selection Change (-4%)

Scroll Canvas (22%)
Before: 3.2ms (2.6-7.9ms)
After: 3.9ms (3.1-10.5ms)

(Chart1)
(Chart2)

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.

4 participants