Open Bug 1996324 Opened 2 months ago Updated 2 months ago

Add the newtab addon version number to the about:home startup cache metadata for startup evaluation / comparisons

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

REOPENED

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.

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.

Assignee: nobody → mconley
Status: NEW → ASSIGNED
Pushed by mconley@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bf17dfb09e81 https://hg.mozilla.org/integration/autoland/rev/30d8b45b19e7 Part 1: Move about:home startup cache tests under browser/components/newtab. r=home-newtab-reviewers,thecount https://github.com/mozilla-firefox/firefox/commit/05874864bfe4 https://hg.mozilla.org/integration/autoland/rev/e1073804264d Part 2: Add the newtab addon version to about:home startup cache metadata, and check it on initialization. r=home-newtab-reviewers,thecount
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3518960180c4 https://hg.mozilla.org/integration/autoland/rev/78c27db74e17 Revert "Bug 1996324 - Part 2: Add the newtab addon version to about:home startup cache metadata, and check it on initialization. r=home-newtab-reviewers,thecount" on request
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 146 Branch → ---
Flags: needinfo?(mconley)

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.

Flags: needinfo?(mconley)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: