Add the newtab addon version number to the about:home startup cache metadata for startup evaluation / comparisons
Categories
(Firefox :: New Tab Page, task)
Tracking
()
People
(Reporter: mconley, Assigned: mconley)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
We clear the cache anytime the newtab XPI is updated or downgraded, but we've encountered at least one case where that hasn't happened and the cache from a prior run was loaded up and incompatible with the newtab XPI.
We guard against this with build ID bumps by including the build ID in the cache metadata, and blowing away the cache on startup if the build ID does not match what's in the cache.
We should do something similar for the New Tab version number.
| Assignee | ||
Comment 1•2 months ago
|
||
What's being tested here isn't really a function of the newtab extension, so much as the
function of the AboutHomeStartupCache and AboutNewTabRedirector modules.
The cache worker script still needs to live under browser/extensions/newtab in order to be
able to be updated in case one of the dependencies to render the cache changes via train-hopping,
so we'll keep the test_AboutHomeStartupCacheWorker.js test where it is.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/30d8b45b19e7
https://hg.mozilla.org/mozilla-central/rev/e1073804264d
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 6•2 months ago
|
||
I asked this to be backed out because there was a bug in the second patch that I didn't notice until I started debugging bug 1998419.
The addonVersion getter on AboutNewTabResourceMapping is populated, unfortunately, asynchronously. By the time that AboutHomeStartupCache initializes and tries to read it, it's too early - it's still null, so with the patch as landed, we'd always ignore the about:home startup cache. That also caused a slight elevation in our Talos test that checks for about:home cache performance: https://treeherder.mozilla.org/perfherder/graphs?highlightAlerts=1&highlightChangelogData=0&highlightCommonAlerts=0&replicates=0&series=mozilla-central,5307253,1,1&timerange=2592000&zoom=1760804898461,1762391050453,356.732153474895,691.8978320735731
The reason this wasn't caught in the automated test that I landed was because the test runs after addonVersion has already been populated, since it's effectively simulating restarts, since real restarts cannot be performed with mochitest-browser tests.
So back to the drawing board on the second part here. The first part still makes sense to keep landed, since it just moves the about:home startup cache tests out to the browser/components/newtab directory where they arguably belong.
Description
•