Closed Bug 1836450 Opened 2 years ago Closed 2 years ago

Redesign the address/credit card normalization flow

Categories

(Toolkit :: Form Autofill, task, P2)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

(Whiteboard: [fxcm-addr-compatibility])

Attachments

(1 file)

Right now we do normalization everywhere, for example:

  1. After fill and before submit the data to parent process
    https://searchfox.org/mozilla-central/rev/87ba454e5c68ff77dff9acb9d7b0b51d6df12d11/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs#638

  2. Parent receives the record and before comparing
    https://searchfox.org/mozilla-central/rev/87ba454e5c68ff77dff9acb9d7b0b51d6df12d11/toolkit/components/formautofill/FormAutofillParent.sys.mjs#471

  3. Before saving/updating record to disk
    https://searchfox.org/mozilla-central/rev/87ba454e5c68ff77dff9acb9d7b0b51d6df12d11/toolkit/components/formautofill/FormAutofillStorageBase.sys.mjs#390

We should define a clear idea when the normalization is needed and what the expected result is for each stage

Attachment #9339792 - Attachment description: WIP: Bug 1836450 - Redesign the address/credit card normalization flow → Bug 1836450 - Redesign the address/credit card normalization flow r=#credential-management-reviewers
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd6b3707b0b4 Redesign the address/credit card normalization flow r=credential-management-reviewers,sgalich

Backed out for causing xpcshell failures on test_creditCardRecords.js.

[task 2023-07-11T08:46:59.300Z] 08:46:59     INFO -  TEST-START | browser/extensions/formautofill/test/unit/test_creditCardRecords.js
[task 2023-07-11T08:51:59.448Z] 08:51:59  WARNING -  TEST-UNEXPECTED-TIMEOUT | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Test timed out
[task 2023-07-11T08:51:59.448Z] 08:51:59     INFO -  TEST-INFO took 300145ms
[task 2023-07-11T08:51:59.448Z] 08:51:59     INFO -  >>>>>>>
[task 2023-07-11T08:51:59.449Z] 08:51:59     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2023-07-11T08:51:59.449Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2023-07-11T08:51:59.449Z] 08:51:59     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2023-07-11T08:51:59.450Z] 08:51:59     INFO -  running event loop
[task 2023-07-11T08:51:59.450Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Starting setup head_initialize
[task 2023-07-11T08:51:59.450Z] 08:51:59     INFO -  (xpcshell/head.js) | test head_initialize pending (2)
[task 2023-07-11T08:51:59.450Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2023-07-11T08:51:59.451Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219448	addons.manager	DEBUG	Application has been upgraded"
[task 2023-07-11T08:51:59.451Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219448	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/GMPProvider.sys.mjs"
[task 2023-07-11T08:51:59.452Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219449	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/SitePermsAddonProvider.sys.mjs"
[task 2023-07-11T08:51:59.452Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219449	addons.manager	DEBUG	Starting provider: XPIProvider"
[task 2023-07-11T08:51:59.453Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219449	addons.xpi	DEBUG	startup"
[task 2023-07-11T08:51:59.453Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219449	addons.xpi	INFO	SystemAddonLocation directory is missing"
[task 2023-07-11T08:51:59.453Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	INFO	Removing all system add-on upgrades."
[task 2023-07-11T08:51:59.454Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	DEBUG	checkForChanges"
[task 2023-07-11T08:51:59.454Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	DEBUG	Loaded add-on state: ${}"
[task 2023-07-11T08:51:59.454Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	DEBUG	scanForChanges changed: false, state: {}"
[task 2023-07-11T08:51:59.455Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	DEBUG	Empty XPI database, setting schema version preference to 35"
[task 2023-07-11T08:51:59.455Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219452	addons.xpi	DEBUG	No changes found"
[task 2023-07-11T08:51:59.455Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219453	addons.manager	DEBUG	Registering shutdown blocker for XPIProvider"
[task 2023-07-11T08:51:59.455Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219454	addons.manager	DEBUG	Provider finished startup: XPIProvider"
[task 2023-07-11T08:51:59.456Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219454	addons.manager	DEBUG	Completed startup sequence"
[task 2023-07-11T08:51:59.458Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219536	addons.xpi-utils	DEBUG	Starting async load of XPI database /var/folders/yh/ysfc_f0n73l57vvxpktn6cm0000014/T/xpc-profile-vt6rj5vx/extensions.json"
[task 2023-07-11T08:51:59.458Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219536	addons.xpi-utils	DEBUG	Rebuilding XPI database with no extensions"
[task 2023-07-11T08:51:59.458Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219536	addons.xpi-utils	DEBUG	Make addon app-temporary:formautofill@mozilla.org visible"
[task 2023-07-11T08:51:59.459Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219536	addons.xpi	DEBUG	XPIStates adding add-on formautofill@mozilla.org in {}: /opt/worker/tasks/task_1689062128/build/application/Firefox Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi"
[task 2023-07-11T08:51:59.461Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219537	addons.xpi	DEBUG	Updating XPIState for {"id":"formautofill@mozilla.org","syncGUID":"{9818bbbc-99e7-4e40-b0f1-cac27dcce8e6}","version":"1.0.1","type":"extension","loader":null,"updateURL":null,"installOrigins":null,"manifestVersion":2,"optionsURL":null,"optionsType":null,"optionsBrowserStyle":true,"aboutURL":null,"defaultLocale":{"name":"Form Autofill","creator":null,"developers":null,"translators":null,"contributors":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"embedderDisabled":false,"installDate":1689065219536,"applyBackgroundUpdates":1,"path":"/opt/worker/tasks/task_1689062128/build/application/Firefox Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi","skinnable":false,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"toolkit@mozilla.org","minVersion":null,"maxVersion":null}],"targetPlatforms":[],"signedState":4,"signedDate":null,"seen":true,"dependencies":[],"incognito":"spanning","userPermissions":{"permissions":[],"origins":[]},"optionalPermissions":{"permissions":[],"origins":[]},"icons":{},"iconURL":null,"blocklistState":0,"blocklistURL":null,"startupData":null,"hidden":false,"installTelemetryInfo":null,"recommendationState":null,"rootURI":"jar:file:///opt/worker/tasks/task_1689062128/build/application/Firefox%20Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi!/","location":"app-temporary"}"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219537	addons.xpi	DEBUG	Loading bootstrap scope from jar:file:///opt/worker/tasks/task_1689062128/build/application/Firefox%20Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi!/"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219537	addons.xpi	DEBUG	Calling bootstrap method install on formautofill@mozilla.org version 1.0.1"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219537	addons.xpi	DEBUG	Calling bootstrap method startup on formautofill@mozilla.org version 1.0.1"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219574	addons.xpi-utils	DEBUG	XPI Database saved, setting schema version preference to 35"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219671	addons.manager	DEBUG	Starting provider: SitePermsAddonProvider"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219671	addons.manager	DEBUG	Registering shutdown blocker for SitePermsAddonProvider"
[task 2023-07-11T08:51:59.463Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219672	addons.manager	DEBUG	Provider finished startup: SitePermsAddonProvider"
[task 2023-07-11T08:51:59.464Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219672	addons.manager	DEBUG	Starting provider: GMPProvider"
[task 2023-07-11T08:51:59.464Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219672	addons.manager	DEBUG	Registering shutdown blocker for GMPProvider"
[task 2023-07-11T08:51:59.464Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219672	addons.manager	DEBUG	Provider finished startup: GMPProvider"
[task 2023-07-11T08:51:59.464Z] 08:51:59     INFO -  PID 11686 | console.error: (new Error("Unexpected content-type \\"text/plain;charset=US-ASCII\\"", "resource://services-settings/Utils.sys.mjs", 399))
[task 2023-07-11T08:51:59.465Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2023-07-11T08:51:59.465Z] 08:51:59     INFO -  (xpcshell/head.js) | test head_initialize finished (2)
[task 2023-07-11T08:51:59.465Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219748	addons.manager	DEBUG	Registering upgrade listener for formautofill@mozilla.org"
[task 2023-07-11T08:51:59.465Z] 08:51:59     INFO -  "CONSOLE_MESSAGE: (info) 1689065219748	addons.xpi	DEBUG	Install of temporary addon in /opt/worker/tasks/task_1689062128/build/application/Firefox Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi completed."
[task 2023-07-11T08:51:59.466Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Starting setup os_key_store_setup
[task 2023-07-11T08:51:59.466Z] 08:51:59     INFO -  (xpcshell/head.js) | test os_key_store_setup pending (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 2 pending (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test os_key_store_setup finished (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Starting setup
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test pending (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 2 finished (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 3 pending (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test finished (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Starting test_initialize
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test test_initialize pending (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_initialize - [test_initialize : 45] Sanity check the temporary file doesn't exist. - true == true
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 3 finished (2)
[task 2023-07-11T08:51:59.468Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_initialize - [test_initialize : 140] 1 == 1
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_initialize - [test_initialize : 141] 0 == 0
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_initialize - [test_initialize : 144] [] deepEqual []
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_initialize - [test_initialize : 151] {"version":1,"addresses":[],"creditCards":[]} deepEqual {"version":1,"addresses":[],"creditCards":[]}
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 4 pending (2)
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  (xpcshell/head.js) | test test_initialize finished (2)
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Starting test_getAll
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  (xpcshell/head.js) | test test_getAll pending (2)
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  TEST-PASS | browser/extensions/formautofill/test/unit/test_creditCardRecords.js | test_getAll - [test_getAll : 45] Sanity check the temporary file doesn't exist. - true == true
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  (xpcshell/head.js) | test run_next_test 4 finished (2)
[task 2023-07-11T08:51:59.471Z] 08:51:59     INFO -  <<<<<<<
[task 2023-07-11T08:51:59.474Z] 08:51:59     INFO -  xpcshell return code: None
[task 2023-07-11T08:51:59.475Z] 08:51:59     INFO -  browser/extensions/formautofill/test/unit/test_creditCardRecords.js | Process still running after test!
[task 2023-07-11T08:51:59.478Z] 08:51:59     INFO -  TEST-START | devtools/client/shared/remote-debugging/adb/xpcshell/test_adb.js
Flags: needinfo?(dlee)
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/404f4926c25a Redesign the address/credit card normalization flow r=credential-management-reviewers,sgalich
Flags: needinfo?(dlee)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Duplicate of this bug: 1836468
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: