Closed Bug 1639942 Opened 2 months ago Closed 2 months ago

Switching between the Kinto and Rust extension storage engines doesn't work

Categories

(Firefox :: Sync, task)

task

Tracking

()

VERIFIED FIXED
Firefox 78
Tracking Status
firefox78 --- verified

People

(Reporter: lina, Assigned: lina)

References

Details

Attachments

(2 files)

STR:

  1. Flip the webextensions.storage.sync.kinto to false (it's true by default) to switch to the Rust engine.
  2. Open the Browser Console.
  3. Call Weave.Service.engineManager.switchAlternatives() to ensure the pref flip takes effect.
  4. Type String(Weave.Service.engineManager.get('extension-storage')._sync) to check the source code.

Expected: The source of this function, indicating it's using the Rust sync engine.

Actual: This, so it's still using Kinto! 😱

(If you then sync and check about:sync-log, you'll notice log lines for Syncing extension settings for <add-on name>, which is also from Kinto).

I think markh said in the demo that it requires restarting after flipping the pref to take effect, no?

Alternative engines are registered using the lowercased version of
the keys in the modules object. But extension-storage is hyphenated,
so we need to use Extension-Storage (not ExtensionStorage) as the
key name, to match the name of the engine and its collection.

Without the hyphen, we'll register the alternative as
extensionstorage, so it'll never be used because everything else
expects the engine to be called extension-storage.

Assignee: nobody → lina
Status: NEW → ASSIGNED

Hmm, I think you do have to restart for the WebExtension API, but there might be another issue on the Sync side—we weren't registering the alternative under the right name (extension-storage vs. extensionstorage), so, even if you flipped the pref and restarted, it would still use Kinto.

Blocks: 1634615
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f350b8dff15d
Correctly register `Extension-Storage` engine alternatives. r=tcsc
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78

Verified as fixed in FF78.0b6. I will attach postfix screenshot

Status: RESOLVED → VERIFIED
Attached image Postfix screenshot
You need to log in before you can comment on or make changes to this bug.