Commit Graph

89 Commits

Author SHA1 Message Date
Nihanth Subramanya
c74861512f Bug 1734542 - [DoH] In steering detection, replace references to the provider's "name" property with "id" instead. r=necko-reviewers,valentin
The name property that existed back when providers were defined in a JSON blob pref
is no longer included in the Remote Settings provider records. This means that
null-checking the property effectively suppresses the steering feature for our
current Remote Settings config. This patch changes `name` to `id` which RS records
DO include.

Differential Revision: https://phabricator.services.mozilla.com/D127927
2021-10-11 23:24:21 +00:00
Nihanth Subramanya
4136d5456a Bug 1619071 - Trip Canary heuristic when canonical lookup contains only local addresses. r=necko-reviewers,valentin
This allows certain routers to signal us to disable DoH when they are not capable of
responding with NXDOMAIN or no A records.

Differential Revision: https://phabricator.services.mozilla.com/D127538
2021-10-06 19:06:07 +00:00
Iulian Moraru
3d0c394997 Backed out changeset 83ed6619c2ea (bug 1619071) for causing multiple bc failures. 2021-10-05 22:47:56 +03:00
Nihanth Subramanya
1bfa7c3536 Bug 1619071 - Trip Canary heuristic when canonical lookup contains only local addresses. r=necko-reviewers,valentin
This allows certain routers to signal us to disable DoH when they are not capable of
responding with NXDOMAIN or no A records.

Differential Revision: https://phabricator.services.mozilla.com/D127538
2021-10-05 16:30:43 +00:00
Geoff Brown
a00c449c2d Bug 1730213 - Explicitly skip tests under browser/ on android; r=ahal
These tests are excluded from android test runs in moz.build. Including
an explicit annotation in each manifest avoids scheduling confusion.
browser-chrome and plain-chrome tests in browser/ are of no concern,
since those test types are never scheduled on android.

Differential Revision: https://phabricator.services.mozilla.com/D125266
2021-09-13 15:22:27 +00:00
Mark Banner
f321dfd6b1 Bug 1729460 - Change users of defineLazyServiceGetter(s) to use Services.* where appropriate. r=mossop,webdriver-reviewers,extension-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D124838
2021-09-10 12:09:49 +00:00
Noemi Erli
20dee875a7 Backed out 2 changesets (bug 1729460) for causing newtab failures CLOSED TREE
Backed out changeset 5617839462be (bug 1729460)
Backed out changeset 6d52fde3ee0e (bug 1729460)
2021-09-10 13:14:12 +03:00
Mark Banner
6a5ffbcc55 Bug 1729460 - Change users of defineLazyServiceGetter(s) to use Services.* where appropriate. r=mossop,webdriver-reviewers,extension-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D124838
2021-09-10 09:38:42 +00:00
Nihanth Subramanya
377aee9853 Bug 1719851 - Allow default-branch regional pref values in DoH Config. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D119516
2021-07-09 17:09:03 +00:00
Valentin Gosu
8d0aefb7c9 Bug 1700951 - Make DoHController watch for network:captive-portal-connectivity-changed instead r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D117652
2021-06-25 07:57:28 +00:00
Nihanth Subramanya
9bf83194d0 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 23:28:16 +00:00
Dorel Luca
c0d5cda63d Backed out 2 changesets (bug 1713036, bug 1714486) for XPCshell failures in netwerk/test/unit/test_trr.js. CLOSED TREE
Backed out changeset 06c40198b074 (bug 1713036)
Backed out changeset 41800e77c675 (bug 1714486)
2021-06-23 23:02:46 +03:00
Nihanth Subramanya
2031dd08e4 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 15:24:01 +00:00
Cosmin Sabou
cb3fbb9a1f Backed out 3 changesets (bug 1714486, bug 1713036) for xpcshell failures on test_trr.js. CLOSED TREE
Backed out changeset 5161c4f25f80 (bug 1713036)
Backed out changeset 6ce07df62710 (bug 1713036)
Backed out changeset c824fe9b4adb (bug 1714486)
2021-06-23 08:00:36 +03:00
Nihanth Subramanya
2c72a2f1e1 Bug 1713036 - Fix some test failures. a=fix
CLOSED TREE

Ensure we only remove the DoH config update observer once in the connection dialog code.
await resetPrefs when cleaning up in the dialog test - it's an async function.
Don't forget to reset the regional pref in browser_remoteSettings_newProfile.js
Use the new default provider pref in test_trr_confirmation.js
2021-06-23 06:51:54 +03:00
Nihanth Subramanya
162c9ee540 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 02:29:18 +00:00
Nihanth Subramanya
82f2c23967 Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-29 23:36:45 +00:00
Alexandru Michis
628ce9a6dd Backed out 2 changesets (bug 1690105) for causing bc failures in browser_rollback.js
CLOSED TREE

Backed out changeset f6fbf6487e6d (bug 1690105)
Backed out changeset c2d171d79b6d (bug 1690105)
2021-05-29 00:29:23 +03:00
Nihanth Subramanya
19add3141b Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-28 11:28:40 +00:00
Csoregi Natalia
00af23a280 Backed out 2 changesets (bug 1690105) for failures on browser_remoteSettings_rollout.js. CLOSED TREE
Backed out changeset 656fd67b37fb (bug 1690105)
Backed out changeset 9e61ccce8c00 (bug 1690105)
2021-05-28 13:35:15 +03:00
Nihanth Subramanya
11bb89d6b0 Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-27 22:30:25 +00:00
Nihanth Subramanya
639a8be8af Bug 1704671 - Expect a TRR mode change from undefined to 0 after restarting DoHController. r=valentin
Some of the changes in bug 1626083 result in a more deterministic flow that uncovers a race
and an incorrect underlying assumption in the test.

The underlying assumption is that clearing mode on shutdown is disabled in tests, which is false - it's enabled.
The race is that we assume that the mode is already 0 and try to ensure it doesn't change, whereas it actually
starts empty (undefined) and changes to 0, because of the incorrect underlying assumption.

This mistake only exists in browser_cleanFlow.js, the other tests are correctly waiting for the final TRR mode
without trying to ensure no change.

Differential Revision: https://phabricator.services.mozilla.com/D114592
2021-05-09 19:10:41 +00:00
Dorel Luca
d97f63d64a Backed out changeset 9467c8b26103 (bug 1704671) for Browser-chrome failures in browser/components/doh/test/browser/browser_cleanFlow.js. CLOSED TREE 2021-05-07 18:18:47 +03:00
Nihanth Subramanya
9621ed6bd1 Bug 1704671 - Expect a TRR mode change from 0 to 2 after restarting DoHController. r=valentin
Some of the changes in bug 1626083 result in a more deterministic flow that uncovers a race
and an incorrect underlying assumption in the test.

The underlying assumption is that clearing mode on shutdown is disabled in tests, which is false - it's enabled.
The race is that we assume that the mode is already 2 and try to ensure it doesn't change, whereas it actually
starts at 0 and changes to 2, because of the incorrect underlying assumption.

This mistake only exists in browser_cleanFlow.js, the other tests are correctly waiting for the final TRR mode
without trying to ensure no change.

Differential Revision: https://phabricator.services.mozilla.com/D114592
2021-05-07 14:22:31 +00:00
Nihanth Subramanya
db1e6bc9f8 Bug 1626083 - Rate-limit DoH heuristics runs. r=necko-reviewers,johannh,dragana
This prevents clients on volatile networks from running heuristics repeatedly,
which has two consequences: performance hit due to the DNS lookups performed by
heuristics, as well as flooding telemetry since we record an event each time.

With this patch, when a heuristics run is first triggered, we run it as usual
but start a timer in the background. Any runs triggered before the timer fires
are coalesced into a count. When the timer fires, if the count exceeded a limit,
we restart the timer and also the count. If the count was within the limit, we
run heuristics just once if it was triggered at least once while throttling.

To make this testable deterministically, I had to make a few subtle changes,
e.g. to not await calls to runHeuristics.

I also took the opportunity to replace BrowserTestUtils.waitForCondition with
the more canonical copy that lives in TestUtils, and to put the confirmationNS
pref into the prefs object so it doesn't need to be explicitly cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D110358
2021-04-12 16:48:42 +00:00
Nihanth Subramanya
8af2f914c0 Bug 1704158 - [DoH] Turn on provider steering by default. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111464
2021-04-12 08:00:53 +00:00
Nihanth Subramanya
b93b678023 Bug 1703989 - Add unit test for DoH parental controls heuristic. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111352
2021-04-09 11:25:58 +00:00
Valentin Gosu
086f34b47e Bug 1658278 - Split TRR's CONFIRM_TRYING into CONFIRM_TRYING_OK and CONFIRM_TRYING_FAILED r=necko-reviewers,nhnt11,dragana,preferences-reviewers
- Adds CONFIRM_TRYING_FAILED confirmation state. We use this state when we retry confirmation after confirmation fails.
- Rename CONFIRM_TRYING to CONFIRM_TRYING_OK. We use this state when we try confirmation but no confirmation failure has happened.
- Rename CONFIRM_INIT to CONFIRM_OFF. We use this state whenever there is an event that would disable TRR - such as a TRR mode change.
- Add CONFIRM_DISABLED confirmation state. We use this state in mode3 or when confirmationNS=="skip"
- To potentially allow us to have the same behaviour as after Bug 1689113, specifically the we might be able to report TRRService::Enabled = true when retrying and the state is CONFIRM_TRYING_FAILED we added `network.trr.attempt-when-retrying-confirmation`
- After a large number of TRR failures occurs, we immediately trigger another confirmation and go into CONFIRM_TRYING_OK. This allows us to cope with a temporary increase in network latency that is smaller than 6s.
- We no longer trigger confirmation for nsIRequest::TRR_FIRST_MODE when the resolver mode is not TRR_FIRST. This allows us to simplify the code.
- test_trr_proxy.js now calls trr_test_setup() after it sets up the pac script to avoid confirmation causing non-local connections in tests.
- Moves all the confirmation state handing into HandleConfirmationEvent

Differential Revision: https://phabricator.services.mozilla.com/D107666
2021-03-19 17:51:26 +00:00
Nihanth Subramanya
ccd9db9859 Bug 1693527 - When migrating old TRR mode, don't clear network.trr.mode if its value is 5. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D105625
2021-02-18 14:34:03 +00:00
Valentin Gosu
10a100023b Bug 1677501 - Add nsIX509CertDB.asyncHasThirdPartyRoots and use it in DoHHeuristics.jsm r=keeler,Gijs,nhnt11
This allows us to avoid calling any NSSCertificateDB methods on the main
thread or allocating memory for xpconnect wrappers of cert objects.

Differential Revision: https://phabricator.services.mozilla.com/D97970
2020-12-01 14:42:36 +00:00
Valentin Gosu
f9de71fb5a Bug 1674328 - Make DNS requests use TRR_DISABLED_MODE instead of using RESOLVE_DISABLE_TRR flag r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95263
2020-11-02 10:30:31 +00:00
Ricky Stewart
31b8ca9716 Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
612312a64c Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
065d2eb893 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
95b44c982f Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
43baed3c18 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Nihanth Subramanya
222a631782 Bug 1668104 - [DoH] Set clearModeOnShutdown pref value explicitly in tests. r=valentin
Depends on D91827

Differential Revision: https://phabricator.services.mozilla.com/D92747
2020-10-07 11:23:00 +00:00
Valentin Gosu
b231428366 Bug 1664874 - Do heuristics DNS lookups at the same time r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D92431
2020-10-05 15:35:45 +00:00
Nihanth Subramanya
57e1b450bd Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 18:06:37 +00:00
Razvan Maries
c141744ed8 Backed out changeset bb81093f7e32 (bug 1662430) for perma failures on browser_rollback.js, browser_connection_dnsoverhttps.js and browser_policyOverride.js. CLOSED TREE 2020-09-24 20:57:28 +03:00
Nihanth Subramanya
e77ebbcea4 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 12:09:52 +00:00
Dorel Luca
f6e46379cc Backed out changeset fccbbed6fc57 (bug 1662430) for Browser-chrome failures in preferences/tests/browser_connection_dnsoverhttps.js. CLOSED TREE 2020-09-24 15:04:39 +03:00
Nihanth Subramanya
2e9c8604a0 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 09:10:11 +00:00
Nihanth Subramanya
ab0ca1d5ce Bug 1666676 - Use fully-qualified names for all lookups performed by DoH heuristics. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D91091
2020-09-23 16:37:19 +00:00
Narcis Beleuzu
ddc7d5072a Backed out changeset 7d0db31be648 (bug 1666676) for bc failure on browser_cleanFlow.js . CLOSED TREE 2020-09-23 16:49:51 +03:00
Nihanth Subramanya
29d809f6f4 Bug 1664870 - Create a data access layer module for DoH config. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D90952
2020-09-23 07:38:05 +00:00
Nihanth Subramanya
82a49913fe Bug 1666676 - Use fully-qualified names for all lookups performed by DoH heuristics. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D91091
2020-09-23 06:36:10 +00:00
Mark Banner
15403a5af5 Bug 1666524 - Fix used of unknown idl property in browser_platformDetection.js. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D91019
2020-09-22 16:23:13 +00:00
Razvan Maries
cf070445d7 Backed out changeset 7e73d7a3ddd2 (bug 1662430) for perma failures on browser_connection_dnsoverhttps.js. CLOSED TREE 2020-09-22 19:19:03 +03:00
Nihanth Subramanya
72775bac07 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-22 07:34:33 +00:00