Prune old synced tabs records when legacy clients disable tabs engine
Categories
(Firefox :: Sync, task)
Tracking
()
People
(Reporter: skhamis, Assigned: skhamis)
References
(Blocks 1 open bug)
Details
Attachments
(2 external files)
https://bugzilla.mozilla.org/show_bug.cgi?id=2094362 solved half of the problem (PDS disables it's own tabs engine). However there still is an issue of if legacy clients (pre per device sync) disable the tabs engine what happens is:
- When a legacy device turns tabs off, _updateEnabledFromMeta calls engine.wipeServer(). That deletes the whole tabs collection, removes tabs from meta/global and adds it to declined.
- On the PDS device, _resolveEngineMetaPerDevice deliberately falls back to the sync ID registry, so the sync ID stays the same ("Keeps the generation if a legacy client removes its meta/global entry"). With no sync ID change there's no reset, so no wipe_remote_tabs.
The next fetch is incremental (newer=lastSync). The legacy device's record no longer exists on the server, so the fetch can't bring back anything to replace or delete it. The local row stays. - getAllClients() only checks that the device is still in the clients collection, and it is. The old tabs show until the TTL cleanup or until the device disconnects.
| Assignee | ||
Comment 1•2 days ago
|
||
Updated•2 days ago
|
Comment 4•2 days ago
|
||
Comment 5•2 days ago
|
||
nit: I had to read this (and the patch) a few times to understand the problem (local record isn't replaced because the wipe doesn't happen) and what was being done about it. It feels like this description would've benefited from a summary of what the patch was going to do, i.e. ensure the PDS client reads all remote tab records.
Comment 6•2 days ago
|
||
A quick claude foray shows that the failure is because the MockTabsEngine.prototype in browser/components/urlbar/tests/unit/test_remote_tabs.js doesn't have an "enabled" property, so the short circuit in SyncedTabs.sys.mjs errors.
Comment 8•1 day ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 day ago
|
Comment 9•23 hours ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Per device syncing is implemented in 162. This is a fix that is needed for PDS to work properly
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Fairly small code surface and is more of a cleanup of tabs records (Which get re-uploaded every sync even if we accidentally did it) so relatively safe.
- String changes made/needed?: N/A
- Is Android affected?: no
| Assignee | ||
Comment 10•23 hours ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D344165
Updated•23 hours ago
|
Comment 11•23 hours ago
|
||
| uplift | ||
Updated•23 hours ago
|
Description
•