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

RESOLVED FIXED in Firefox 68

Status

()

defect
P1
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: chutten, Assigned: chutten)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
2
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 months ago

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...

Assignee

Comment 2

2 months ago

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)
Assignee

Comment 5

2 months ago

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

Updated

2 months ago
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Points: --- → 2
Priority: -- → P1

Comment 6

2 months ago
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

Comment 7

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee

Updated

2 months ago
Blocks: 1547750
Assignee

Updated

2 months ago
No longer blocks: 1547750
You need to log in before you can comment on or make changes to this bug.