Closed Bug 1657582 Opened 4 years ago Closed 4 years ago

Merge asyncResolveByType and asyncResolveWithTRRServer into asyncResolve

Categories

(Core :: Networking: DNS, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

No description provided.

This patch adds the nsIDNSResolverInfo interface which is used to hold
information about the resolver to be used in a DNS resolution.

We use this to merge all of the *WithTRRServer resolve functions into one.
Passing a resolver info will use that object when appropriate. No resolver
info means that we default to using the system resolver, or the default TRR
resolver.

This interface extends nsIDNSRecord and makes the DNS code more extensible
by allowing us to support more record types.
This change does require the consumer to be aware of the type they requested
and to QueryInterface to either nsIDNSAddrRecord for regular IP lookups,
or to nsIDNSByTypeRecord for other kinds of lookups.

Depends on D86176

Does it make any sense to expose some kind of resolverinfo functionality to extensions?

(In reply to Shane Caraveo (:mixedpuppy) from comment #3)

Does it make any sense to expose some kind of resolverinfo functionality to extensions?

I think it's a little early for that. Currently we only use non-default resolvers for experiments. Right now if an extension needs to use a different DoH resolver they can do a HTTPS request and parse the result themselves, in JS. But I don't know if there is a real need for this at the moment.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0f17312b01ad Add nsIDNSResolverInfo interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,extension-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/784122a5f5ab Add nsIDNSAddrRecord interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,dragana

Backed out 2 changesets (bug 1657582) for test_DNSLookup.js failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=P5-JtfK-QfOC9Ujo4nOTLg.0&searchStr=xpcshell&fromchange=203dd164f9cace9472671d4f63350c31f856ecb0&tochange=6a2b9be4ce0097d0d137e2184ec4576328ee292c

Backout link: https://hg.mozilla.org/integration/autoland/rev/6a2b9be4ce0097d0d137e2184ec4576328ee292c

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=312801282&repo=autoland&lineNumber=6454

[task 2020-08-12T08:11:09.842Z] 08:11:09     INFO -  TEST-START | browser/components/doh/test/unit/test_DNSLookup.js
[task 2020-08-12T08:11:10.082Z] 08:11:10  WARNING -  TEST-UNEXPECTED-FAIL | browser/components/doh/test/unit/test_DNSLookup.js | xpcshell return code: 0
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  TEST-INFO took 245ms
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  >>>>>>>
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  running event loop
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  browser/components/doh/test/unit/test_DNSLookup.js | Starting setup
[task 2020-08-12T08:11:10.082Z] 08:11:10     INFO -  (xpcshell/head.js) | test setup pending (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  TEST-PASS | browser/components/doh/test/unit/test_DNSLookup.js | setup - [setup : 1] "50280" != null
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  TEST-PASS | browser/components/doh/test/unit/test_DNSLookup.js | setup - [setup : 1] "50280" != ""
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  (xpcshell/head.js) | test setup finished (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  browser/components/doh/test/unit/test_DNSLookup.js | Starting test_SuccessfulRandomDNSLookup
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  (xpcshell/head.js) | test test_SuccessfulRandomDNSLookup pending (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  TEST-PASS | browser/components/doh/test/unit/test_DNSLookup.js | test_SuccessfulRandomDNSLookup - [test_SuccessfulRandomDNSLookup : 20] true == true
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  TEST-PASS | browser/components/doh/test/unit/test_DNSLookup.js | test_SuccessfulRandomDNSLookup - [test_SuccessfulRandomDNSLookup : 21] 0 == 0
[task 2020-08-12T08:11:10.083Z] 08:11:10     INFO -  TEST-PASS | browser/components/doh/test/unit/test_DNSLookup.js | test_SuccessfulRandomDNSLookup - [test_SuccessfulRandomDNSLookup : 22] {"QueryInterface":"function QueryInterface() {\\n    [native code]\\n}"} == true
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  Unexpected exception TypeError: result.record.IsTRR is not a function at Z:/task_1597219013/build/tests/xpcshell/tests/browser/components/doh/test/unit/test_DNSLookup.js:23
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  test_SuccessfulRandomDNSLookup@Z:/task_1597219013/build/tests/xpcshell/tests/browser/components/doh/test/unit/test_DNSLookup.js:23:27
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  _do_main@Z:\task_1597219013\build\tests\xpcshell\head.js:248:6
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  _execute_test@Z:\task_1597219013\build\tests\xpcshell\head.js:577:5
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  @-e:1:1
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  exiting test
[task 2020-08-12T08:11:10.084Z] 08:11:10     INFO -  <<<<<<<
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/85e974b78b92 Add nsIDNSResolverInfo interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,extension-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/ee9205ab1155 Add nsIDNSAddrRecord interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,dragana
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Depends on: 1658788

Prior notice to the TB is always appreciated.

Flags: needinfo?(valentin.gosu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: