Closed Bug 1712297 Opened 3 years ago Closed 3 years ago

Pinned topsites search shortcuts left hanging when @search_engine gets removed

Categories

(Firefox :: Top Sites, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
firefox-esr78 89+ verified
firefox88 --- wontfix
firefox89 + verified
firefox90 + verified

People

(Reporter: aflorinescu, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Attached file user.js
[Description:]

In the case when a @search_engine_shortcut is pinned and by some reason, the search_engine gets removed, the search_engine_shortcut is left hanging, pointing to nothing.

[Steps:]
  1. Download an hr locale - let's say 87.0b3.
  2. Use an user.js that sets the region to IN: user_pref("browser.search.region", "IN");
  3. Start the hr/IN Firefox, observe the amazon.co.uk search engine + pinned topsite amazon.co.uk
  4. Close browser down, modify the user.js to point towards staging (on staging the amazon gets removed from any IN regions that are not in a shortlist)
  5. Reopen the browser using the user.js pointing towards staging (attached)
[Actual Result:]

The amazon search shortcut tile is still pinned and available, pointing to an search shortcut that has no engine.

[Expected Result:]

Not sure what is the best approach to handle this case elegantly.

[Note:]

This is not a regression, but changes like bug 1705374 will make this issue much more visible.

Let's raise this to an S3 and block the amazon search-config changes until we inquire deeper into how many people are going to be affected.

Severity: -- → S3

Also, for the sake of clarity, the 87.0b3 in step 3 has the dump = true, which means it shall load the topsites data present at the time of the 87.0b3 build, which has amazon as pinned search-shortcut.
Redoing the above step with dump = false will not have amazon as search shortcut or pinned for IN as per current Remote Settings top-sites configuration. (https://settings.prod.mozaws.net/v1/buckets/main/collections/top-sites/records)

Later edit:
The same test with release 87.0 20210318103112 for IN has amazon.co.uk unpinned, so a new profile with 87.0 won't encounter this issue.

Does the issue persist after another restart?

Flags: needinfo?(adrian.florinescu)

(In reply to Dão Gottwald [::dao] from comment #4)

Does the issue persist after another restart?

Yes, I was doing a force sync for RS and then a default restart anyways for search-config to get applied, but I redid the test to be sure. In the case in which you started with amazon search shortcut tile pinned, I'm pretty sure any version top-site migration won't touch it and when search engine gets removed, we won't touch it again since it's pinned.

Flags: needinfo?(adrian.florinescu)
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

[Tracking Requested - why for this release]: We're planning to release a set of Amazon changes to rework our Amazon deployments. As part of that, various region/locale combinations will loose an Amazon search engine, and will therefore hit this bug.

Severity: S3 → S2
Priority: -- → P1
Attachment #9222986 - Attachment description: WIP: Bug 1712297 - Hide pinned search shortcut when its engine gets removed/hidden. → Bug 1712297 - Hide pinned search shortcut when its engine gets removed/hidden.
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ae61361cde0
Hide pinned search shortcut when its engine gets removed/hidden. r=Standard8

Comment on attachment 9222986 [details]
Bug 1712297 - Hide pinned search shortcut when its engine gets removed/hidden.

Beta/Release Uplift Approval Request

  • User impact if declined: Users may be left with a unusable Amazon search shortcut pinned on the new tab page. This will happen after a reconfiguration that we are planning on doing soon.

Automated test in follow-up patch.

  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small change to how search shortcuts are handled on top sites. Only affects when an engine is removed.
  • String changes made/needed: None
Attachment #9222986 - Flags: approval-mozilla-release?
Attachment #9222986 - Flags: approval-mozilla-beta?
Flags: qe-verify+

(requested both beta & release, as I'm not quite sure the best one given the state of the trees).

Comment on attachment 9222986 [details]
Bug 1712297 - Hide pinned search shortcut when its engine gets removed/hidden.

Removing beta approval as we have merged mozilla-beta to mozilla-release today, uplift requests now target our 89 Release Candidate.

Attachment #9222986 - Flags: approval-mozilla-beta?

Mark, do we need this patch in ESR as well? Thanks

Flags: needinfo?(standard8)
Attached patch 1712297esr.txtSplinter Review

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration: Updating the Amazon configuration may leave a highly visible piece of UI functioning incorrectly - clicking the Amazon shortcut and entering a query would end up doing a search on the default engine for @amazon <my query>
User impact if declined: See above
Fix Landed on Version: Current nightly & 89 uplift requested
Risk to taking this patch (and alternatives if risky): Low

This is the unbitrotted code patch. The test patch will apply without changes.

Flags: needinfo?(standard8)
Attachment #9223225 - Flags: approval-mozilla-esr78?
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Comment on attachment 9222986 [details]
Bug 1712297 - Hide pinned search shortcut when its engine gets removed/hidden.

Approved for RC, thanks.

Attachment #9222986 - Flags: approval-mozilla-release? → approval-mozilla-release+

Comment on attachment 9223225 [details] [diff] [review]
1712297esr.txt

Approved for ESR, thanks.

Attachment #9223225 - Flags: approval-mozilla-esr78? → approval-mozilla-esr78+
QA Whiteboard: [qa-triaged]

Indepth verification has been done here covering various update paths and scenarios, with more details about the scenarios/versions/regions/locales combinations used here.

Most regression testing scenarios involved ensuring that the removal and restore/addition of a search-engine, either manually or by search-config update will cause no unforseen regressions related to this fix. The focus was around 78.11.0esr, 89.0 RC and 90.0a1 with different update paths and search-config starting points while covering Ubuntu 20.04, Windows 10 and Mac OSX 11 and 10.13.6.
Additionally we also ensured that the sponsored tiles are not affected either by this fix.

Blocks: 1712950
No longer depends on: 1712950

Removing qe-verify+ flag, based on Comment 20.

Flags: qe-verify+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03c869dfeb38
Add test for checking pinned search shortcuts are hidden when the associate engine is removed. r=amy,dao
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: