[dns] Expose resolution details for successful requests [chromium/src : main]

0 views
Skip to first unread message

Kenichi Ishibashi (Gerrit)

unread,
Apr 3, 2026, 1:16:54 AM (3 days ago) Apr 3
to Adam Rice, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice

Kenichi Ishibashi voted and added 1 comment

Votes added by Kenichi Ishibashi

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Kenichi Ishibashi . resolved

ricea@: PTAL, I want to submit this and (maybe two) subsequent CLs before branch cut (Monday). Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I576ab279c70f9c40b96b2ac0d5491d9354d38ecf
Gerrit-Change-Number: 7725381
Gerrit-PatchSet: 7
Gerrit-Owner: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Apr 2026 05:16:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Kenichi Ishibashi (Gerrit)

unread,
Apr 3, 2026, 5:28:52 PM (2 days ago) Apr 3
to Andrew Williams, Adam Rice, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice and Andrew Williams

Kenichi Ishibashi added 1 comment

Patchset-level comments
Kenichi Ishibashi . resolved

awillia@: Would you be able to take a look, if ricea@ couldn't take a look? I'd like to submit this and following CLs by the next branch cut (Monday).

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Andrew Williams
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I576ab279c70f9c40b96b2ac0d5491d9354d38ecf
Gerrit-Change-Number: 7725381
Gerrit-PatchSet: 7
Gerrit-Owner: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Attention: Andrew Williams <awi...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Apr 2026 21:28:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Williams (Gerrit)

unread,
Apr 3, 2026, 6:50:41 PM (2 days ago) Apr 3
to Kenichi Ishibashi, Adam Rice, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Adam Rice and Kenichi Ishibashi

Andrew Williams added 7 comments

Patchset-level comments
Andrew Williams . resolved

LGTM overall but leaving some questions and optional comments

File net/dns/host_resolver_manager_job.cc
Line 1154, Patchset 7 (Latest): NOTREACHED();
Andrew Williams . unresolved

optional: maybe stream `type` to the `NOTREACHED()` so if it ever does get reached we'll know which case it is

File net/dns/host_resolver_manager_request_impl.cc
Line 345, Patchset 7 (Latest): if (stale_info.has_value()) {
Andrew Williams . unresolved

Would it be better to have this logic in ResolveLocally? I'm wondering whether it will always be the case that stale_info.has_value means the source was kCache vs. kLocal, of if a change in ResolveLocally to the semantics could break this logic.
One benefit of moving it into ResolveLocally would be we wouldn't need this if statement in both RequestImpl::DoResolveLocally and ServiceEndpointRequestImpl::DoResolveLocally

If we went with this change, adding another out parameter to ResolveLocally seems not ideal. Maybe a follow-on refactor could make all of the passed back state be combined into a new struct that ResolveLocally returns (combining the results, tasks, and stale_info)? I also noticed HostCache::Entry already has "Source" that seems similar to ResolutionDetails. Should ResolutionDetails be added to HostCache::Entry? Could it replace Source?

Just thinking out loud, feel free to ignore

File net/dns/host_resolver_manager_service_endpoint_request_impl.cc
Line 425, Patchset 7 (Latest): resolution_details_ = details;
Andrew Williams . unresolved

Just to check, should we set resolution_details_ to something in the `is_stale && stale_allowed_while_refreshing` case as well?

File net/dns/host_resolver_manager_unittest.cc
Line 6170, Patchset 7 (Latest): ResolutionSource::kCache);
Andrew Williams . unresolved

Just to check, it's OK that results from the secure cache and from the insecure cache share a ResolutionSource?

File net/dns/resolution_details.h
Line 31, Patchset 7 (Latest): kNat64 = 8,
Andrew Williams . unresolved

I didn't see a test cases demonstrating kLocal or kNat64 as the ResolutionSource. Is there an existing test we can add those to? Same with kPlatform, but I'm assuming we haven't implemented those types of host resolutions yet.

Line 35, Patchset 6:struct NET_EXPORT ResolutionDetails {
Andrew Williams . unresolved

Is this in a struct because we plan to add stuff to it? If so and it will eventually have more than two primitive types in it, we may want to proactively std::move it when we pass it around since we may not think to add std::move to uses after adding members to this.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Kenichi Ishibashi
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I576ab279c70f9c40b96b2ac0d5491d9354d38ecf
    Gerrit-Change-Number: 7725381
    Gerrit-PatchSet: 7
    Gerrit-Owner: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Apr 2026 22:50:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages