-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Correct typespec for inet_res:getbyname/2,3 (PR #5412, OTP-17986) #5803
Correct typespec for inet_res:getbyname/2,3 (PR #5412, OTP-17986) #5803
Conversation
CT Test Results 2 files 65 suites 53m 44s ⏱️ For more details on these failures, see this check. Results for commit 4e664c1. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
getbyname/2,3 |
I think the first paragraph starting with "Resolves a DNS record of the specified Type for the specified host..." is the most general description. That it uses the I will rephrase to reduce the cluttering when describing the |
S2S DNS discovery fix This PR fixes an issue with S2S connections using DNS discovery where connecting to another server would fail. The root cause was that inet_res:getbyname/3 returns a DNS type instead of the expected inet type needed for establishing connection. The updated logic now includes a proper lookup for the correct inet type to ensure successful connections. Previously, the Erlang documentation did not clearly specify this behavior, which could be misleading. More details can be found here: erlang/otp#5803. Testing was performed by mocking the appropriate inet functions. An alternative solution could involve setting up a local DNS server or using external tools like dnsmasq to set up a lightweight DNS resolver. However, this would require installing additional dependencies in the CI environment, so mocking was chosen as a simpler solution.
Closes PR #5412.
Instead of changing the
#hostent{}
record type; correct the return type forinet_res:getbyname/2,3
by creating a parallel tuple type that defines the peculiar use of the#hostent{}
record.