Closed Bug 2086037 Opened 24 days ago Closed 22 days ago

Improve retry handling in the credit card Rust migration

Categories

(Toolkit :: Form Autofill, task, P2)

task

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

(Whiteboard: [fxcm-backlog])

Attachments

(1 external file, 1 obsolete file)

The credit card migration dry run (bug 2081661) runs once per profile and
stops, even when it fails. So it never exercises the retry path, and it can't
tell a temporary failure from a permanent one. Some failures do clear: 2 of
215 profiles whose every card failed to decrypt later read them fine, which
matters for bug 2085806.

Proposed changes:

  1. Raise MAX_ATTEMPTS from 3 to 10, for both the dry run and the real
    migration.
  2. Retry a failed dry run on later launches, up to the limit, using its own
    migrationTestAttempts pref. Report the attempt in migrate_to_rust.
  3. When the real migration reaches the limit, set rust.enabled to false so
    the profile stays on JSON. rust.enabled is controlled through Nimbus
    (bug 2080704), so make sure a later enrolment can't flip it back with no
    attempts left.

A dry_run extra on migrate_to_rust would also let the dashboard separate
dry runs from real migrations.

Some migration failures clear on a later launch, so the attempt limit goes
from 3 to 10, for credit cards and for the address migration already in the
field, whose profiles that gave up at 3 attempts will try again. A failed dry
run now retries on later launches on its own migrationTestAttempts budget
instead of recording its generation as done. When the real migration spends
its last attempt it clears rust.enabled and treats it as false from then on,
so a Nimbus enrolment cannot restart it.

Whiteboard: [fxcm-backlog]

Some migration failures clear on a later launch, so the attempt limit goes
from 3 to 10, for credit cards and for the address migration already in the
field, whose profiles that gave up at 3 attempts will try again. A failed dry
run now retries on later launches on its own migrationTestAttempts budget
instead of recording its generation as done. Once the real migration has
spent its attempts, rust.enabled is treated as false, so a Nimbus enrolment
cannot restart it. The pref itself is not written: Nimbus would unenrol the
profile from the rollout that set it, and its remaining events would drop out
of the rollout's telemetry.

Attachment #9668520 - Attachment is obsolete: true
Pushed by dlee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ff0b237ad46c https://hg.mozilla.org/integration/autoland/rev/e05680a24105 Retry a failed autofill migration dry run and leave a given-up profile on JSON. r=theidkamp,credential-management-reviewers
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: