Closed Bug 1545207 Opened 1 year ago Closed 1 year ago

browser.search.region is set early in new profiles, causing quick session split and environment-change ping in telemetry-tests-client tests

Categories

(Toolkit :: Telemetry, defect, P1)

defect
Points:
2

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

browser.search.region is a userPref in that it is included in the Telemetry Environment and is monitored for changes so as to produce a session split and a "main" ping with reason "environment-change". In the event that the timezone is one that overlaps the US, but the geoIP probe comes back with a non-US region, the search region needs to be adjusted, so the pref is changed.

In normal execution this happens close enough to the start of a session that the minimum subsession length squelches the ping before it is even assembled.

In telemetry-tests-client the minimum subsession length is set to 0 so there is no squelch.

Thus I (in Canada west of New Brunswick) am getting one extra "main" ping when running ./mach telemetry-tests-client than :raphael or try is getting.

This bug is about figuring out what to do about this.

We shouldn't actually hit the server in the tests though, should we? It's all faked...

It correctly identifies me as browser.search.region CA when run locally. So maybe that's a problem right there?

Do you happen to know by what mechanism the search service knows not to try and hit the server?

Flags: needinfo?(mozilla)

Do you happen to know by what mechanism the search service knows not to try and hit the server?

In the search tests, we set the URLS to data: URLS and fake the country codes.

https://searchfox.org/mozilla-central/source/toolkit/components/search/tests/xpcshell/test_location.js#10

I'm guessing the telemetry test doesn't do that.

Flags: needinfo?(mozilla)

You're right, :mkaply, it doesn't do that. And it's a matter of a single line of code to encourage it to do so.

Assignee: nobody → chutten
Status: NEW → ASSIGNED
Points: --- → 2
Priority: -- → P1
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f36aca8e78b
Mock the Search Service region test in Telemetry Client Tests r=raphael
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1547750
No longer blocks: 1547750
You need to log in before you can comment on or make changes to this bug.