-
Notifications
You must be signed in to change notification settings - Fork 73
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
Support custom DNS IP and DNS failover IP using custom DNS resolver #685
Support custom DNS IP and DNS failover IP using custom DNS resolver #685
Conversation
AP-2314 Allow Customers To Override DNS When 'ENOTFOUND' Errors Are Returned From The Chromatic CLI
WhatFrom time to time, customers encounter DNS lookup errors, typically on Macs, where the CLI can resolve WhyWhen Node passes the DNS lookup to the host OS, most of the time it simply works. But there are times when that DNS simply fail. The HowThe proposed solution would be to allow customers to set an environment variable to configure DNS servers that the CLI would use. There is a branch out on the CLI's repo that hard codes DNS to 1.1.1.1 and 4.4.4.4, |
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 like having both options to override default and still have a fail over.
There's no cache built into Node direct DNS, do we want to add a layer or just accept the extra lookups will happen?
That is a good idea and there are packages that will wrap the |
I looked at axios-cached-dns-resolve, but since we don't use Axios, I don't think we can use it. I briefly looked for a lower-level alternative, but didn't find an obvious candidate. Considering the limited amount of requests we actually do (assuming the use of |
… switch to failover DNS IP on consecutive ENOTFOUND
6e2fda0
to
d0fd194
Compare
CHROMATIC_DNS_SERVERS
environment variable to support custom DNS IP addresses.ENOTFOUND
error, automatically switch to using a custom DNS resolver that doesn't rely on OS-level DNSCHROMATIC_DNS_FAILOVER_SERVERS
environment variable use when we still encounterENOTFOUND
even using the custom DNS resolver.