-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
} | ||
} | ||
|
||
func lookupIP(t *testing.T, domainName string) (string, error) { |
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.
This was a true yak shave... Couldn't figure out another way to resolve it. Could be my own dev machine DNS resolution is broken, but this fixed that issue.
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.
@autero1 I found when launching services on my GKE cluster it takes around 5 minutes until the public IPs are resolving. Could this be something similar?
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.
That might well be the case.
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.
Hmm I can't seem to find any reference to DNS caching in Go other than this old post: https://stackoverflow.com/questions/40251727/does-go-cache-dns-lookups, which suggests it is NOT cached. Also, reading the documentation for net
, it looks like it just looks it up using the configured DNS servers of your computer.
Is your dev machine DNS set to use google as well? And were you getting the same issue in CircleCI?
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.
What was odd, was that while the test locally was failing to resolve, dig
gave me the correct results.
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.
Looking good!
} | ||
} | ||
|
||
func lookupIP(t *testing.T, domainName string) (string, error) { |
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.
@autero1 I found when launching services on my GKE cluster it takes around 5 minutes until the public IPs are resolving. Could this be something similar?
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! Suggested fixes for some style nits and typos.
"net/http" | ||
"strings" | ||
"testing" | ||
"time" |
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.
NIT: See above re imports
} | ||
} | ||
|
||
func lookupIP(t *testing.T, domainName string) (string, error) { |
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.
Hmm I can't seem to find any reference to DNS caching in Go other than this old post: https://stackoverflow.com/questions/40251727/does-go-cache-dns-lookups, which suggests it is NOT cached. Also, reading the documentation for net
, it looks like it just looks it up using the configured DNS servers of your computer.
Is your dev machine DNS set to use google as well? And were you getting the same issue in CircleCI?
Co-Authored-By: autero1 <[email protected]>
Co-Authored-By: autero1 <[email protected]>
Co-Authored-By: autero1 <[email protected]>
This PR adds support for hosting static websites with Google Cloud Storage.