Closed Bug 2085806 Opened 25 days ago Closed 22 days ago

Credit card Rust migration dry run shows issues to fix

Categories

(Toolkit :: Form Autofill, defect, P3)

defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

(Whiteboard: [fxcm-backlog])

Attachments

(3 external files)

Found in the Nightly dry run (bug 2081661): on macOS and Linux, the copy into the Rust store waits for the OS key store and starts at its unlock. That unlock happens in the middle of the user's own action (a fill, a submission, a save, or editing a card in settings), so that action's write lands during the copy, or after the switch in the old JSON store. In the real migration, the write is lost.

See Also: → 2086034
See Also: → 2086037
Whiteboard: [fxcm-backlog]

The JSON store keeps serving while it is copied, and the unlock that starts a
deferred credit card copy is usually a fill, whose use count update lands
after the export. The copy then switched to Rust without it. The migrator now
fails such a run like any other, so it is retried on a later launch.

Writes are not held back during the copy, as the password migration does by
running before its store is handed out: the credit card copy usually starts
mid-session, on the OS key store's first unlock, so every write path would
have to wait on it. Detecting the write leaves callers unchanged.

The unlock lands in the middle of the action that caused it: a submission's
duplicate check, a save's encryption, or opening a card for editing. That
action's own write then fell inside the copy, or after the switch into a store
that no longer serves.

A copy waiting for the key store now starts at the first of these safe points
reached with the key store unlocked, each of which has left nothing pending:

  • the end of a fill (FormAutofillParent.autofillFields);
  • the end of a form submission, once any doorhanger it showed is done with,
    its save included (FormAutofillParent.onFormSubmit; promptToSave now awaits
    the save);
  • the closing of the card editor in settings (EditCreditCardDialog).

Depends on D337526

The deferred credit card migration was its only listener, and now waits for a
safe point instead.

Depends on D337527

Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/700c85484d9a https://hg.mozilla.org/integration/autoland/rev/7c5f759c29bb P1. Fail an autofill migration into the Rust store when the JSON store is written to during the copy. r=theidkamp,credential-management-reviewers https://github.com/mozilla-firefox/firefox/commit/c230f2cbe571 https://hg.mozilla.org/integration/autoland/rev/50c1d3349b17 P2. Start a deferred credit card migration at a safe point instead of at the OS key store unlock. r=theidkamp,credential-management-reviewers https://github.com/mozilla-firefox/firefox/commit/d9f2b0dab7dc https://hg.mozilla.org/integration/autoland/rev/4edabeda72e6 P3. Remove OSKeyStore.UNLOCKED_TOPIC. r=theidkamp
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: