Closed Bug 1547750 Opened 5 years ago Closed 5 years ago

browser.cache.disk.capacity 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

(3 files)

+++ This bug was initially created as a clone of Bug #1545207 +++

browser.cache.disk.capacity 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 the smart cache sizer dictates a disk cache size different from the default, this 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.

My Windows laptop, for whatever reason, gets a different-from-default cache size set, causing the pref change causing the extra ping causing the tests to fail.

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

Looks like we can turn the smart disk cache sizer off with browser.cache.disk.smart_size.enabled. Let's do that.

No longer depends on: 1545207

This is because the smart sizer changes a monitored userPref close to
startup, which induces an extra "main" ping (causing tests to fail).

Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b16812e723e
Disable cache smart sizing for telemetry-tests-client r=raphael
Regressions: 1547822

There seems to be a timing failure causing install_addon to not always cause an "environment-change"-reason "main" ping. Near as I can tell from the Telemetry tracelogs, this is because the Telemetry Environment hasn't finished initializing so squelches the early changes.

This might help explain why the failures happened on debug and asan builds: slower builds are more likely to not have finished init.

I was able to reproduce bug 1547750 locally on my Windows laptop with a debug build.

We need a plan, I think.

Flags: needinfo?(chutten)
Assignee: nobody → chutten
Status: NEW → ASSIGNED

This sometimes introduces an environment change ping when it shouldn't, and
hides that install_addon doesn't actually trigger an environment change.

Depends on D29388

Alrighty, I think we've nailed it. Turns out the disk cache capacity change was triggering the environment change. When I removed it, it showed that install_addon didn't actually cause the needed ping reliably.

So now we ensure TelemetryEnvironment's been init'd before installing the addon.

Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d0a36165af121feb2b738911e5e21c097322fd12

(ignore the flake8 failure, that's in a WIP optout ping test patch for bug 1539830)

Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9491a79c5266
Ensure Environment is init'd before trying to install addon in telemetry-tests-client r=raphael
https://hg.mozilla.org/integration/autoland/rev/b97e4935d9b9
Disable cache smart-sizing in telemetry-tests-client r=raphael
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: