-
Notifications
You must be signed in to change notification settings - Fork 113
fix: swap status monitor dns resolver with native resolver #2432
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: swap status monitor dns resolver with native resolver #2432
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
PR Summary
This PR replaces the DNS resolver in the status monitor with the native system resolver, improving reliability by leveraging the system's built-in DNS resolution capabilities.
- Modified
packages/core/api/status/src/route/actor.rs
to useToSocketAddrs
for native DNS resolution - Updated
lookup_dns
function to accept port parameter and run in a blocking task - Adapted
test_actor_connection
to pass port tolookup_dns
for complete socket address resolution - Removed dependency on
hickory_resolver
in favor of system DNS resolver
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
// Use native resolver in a blocking task | ||
let addrs = tokio::task::spawn_blocking(move || { | ||
GlobalResult::Ok( | ||
addr.to_socket_addrs()? | ||
.into_iter() | ||
.map(|x| x.ip()) | ||
.collect::<Vec<_>>(), | ||
) | ||
}) | ||
.await??; |
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.
logic: Double unwrap (??) of Result types could mask underlying errors. Consider handling each error case separately for better error reporting.
Deploying rivet with
|
Latest commit: |
13d14bb
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a51738b2.rivet.pages.dev |
Branch Preview URL: | https://05-07-fix-swap-status-monito.rivet.pages.dev |
13d14bb
to
35fc915
Compare
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
Changes