Closed
Bug 1196096
Opened 9 years ago
Closed 9 years ago
SyncManager in System app.
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(feature-b2g:2.5+)
People
(Reporter: selee, Assigned: ferjm)
References
Details
(Whiteboard: [partner-cherry-pick])
Attachments
(2 files, 1 obsolete file)
In system app, the synchronization scheduler do the following task: * Handle Data Sync configurations changes, e.g. collection selection (history, bookmarks, tabs, and password), sync enabling or disabling and "Sync now" request. (1168185) * Sync State Machine - handling these states: disabled, enabling, enabled, synchronizing, error. (bug 1168160) * Configure requestSync and then trigger the synchronization task to Synchronizer app (bug 1195647).
Updated•9 years ago
|
Updated•9 years ago
|
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → ferjmoreno
Target Milestone: --- → FxOS-S6 (04Sep)
Assignee | ||
Updated•9 years ago
|
Summary: [DataSync] Synchronization Scheduler in System app. → [DataSync] Sync Manager in System app.
Comment 1•9 years ago
|
||
feature-b2g: --- → 2.5+
Target Milestone: FxOS-S6 (04Sep) → FxOS-S7 (18Sep)
Assignee | ||
Comment 2•9 years ago
|
||
These are the applications I am using to test the manager locally. - test-sync app: this is a mock of the settings UI. - test-synchronizer app: this is a mock of the synchronizer app. With these two applications installed you should be able to enable Sync, which should schedule a sync request to be triggered in 2 minutes. You can also play with the SyncStateMachine and check that some states are allowed and others aren't depending on the current state. You can logout from FxA while Sync is enabled to check that it is properly disabled. You can change the collections to be synchronized. You can request a sync on demand, which should open the synchronizer app that emulates a sync with a five seconds timeout and sends the result of the sync back to the manager .... I recommend enabling debug on SyncManager while testing this.
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master This is still not finished. I need to clean the code, add some more comments, fix the TODOs and write some unit tests, but I could use some feedback in the meantime. I am specially interested on feedback about the architecture (IAC, settings, events usage, etc.), edge cases and potential bugs that I missed. Thank you!
Attachment #8657355 -
Flags: feedback?(selee)
Attachment #8657355 -
Flags: feedback?(mbdejong)
Comment 4•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master Great stuff, exciting to see us progress! :) Left some comments on github.
Attachment #8657355 -
Flags: feedback?(mbdejong) → feedback+
Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master Hey Fernando, Thanks a lot for defining IAC API for Settings app. \O/ The two main opinions have been left at github: * IAC API definition for getting status of FxSync. * L10N support for error messages.
Attachment #8657355 -
Flags: feedback?(selee) → feedback+
Assignee | ||
Updated•9 years ago
|
Summary: [DataSync] Sync Manager in System app. → SyncManager in System app.
Assignee | ||
Comment 6•9 years ago
|
||
I am updating the test applications to address the latest changes in the SyncManager. Basically, the app mocking what the Settings app should do is now using the IAC based API to obtain the information about Sync (current state, error, last sync time) instead of the Settings API, as suggested by Sean.
Attachment #8658783 -
Attachment is obsolete: true
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master Etienne, do you mind taking a look at this patch, please? You can find an explanation of what the SyncManager is supposed to do in the code comments, but feel free to ping me on IRC if you need any further explanation. Thanks!
Attachment #8657355 -
Flags: review?(etienne)
Comment 8•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master Looking good! Made some comments on github, mainly waiting for the Settings stuff to be sorted out before r+'ing. Question: any ideas about how we're going to add integration "sanity" tests for this once all the moving parts will be in place? Remark: once everything is landed we should formalize the review ownership for this, probably something similar to the dialer (ie. an app directory + very specific system app files). Cheers!
Attachment #8657355 -
Flags: review?(etienne) → feedback+
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Etienne Segonzac (:etienne) from comment #8) > Comment on attachment 8657355 [details] [review] > [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master > > Looking good! > Made some comments on github, mainly waiting for the Settings stuff to be > sorted out before r+'ing. Thanks! I just updated the PR. > > Question: any ideas about how we're going to add integration "sanity" tests > for this once all the moving parts will be in place? > For functionally testing the SyncManager we'll need to finish Bug 1168185 first and write some Marionette tests to test the Settings UI. For functionally testing the whole Sync feature, we need to check if Marionette allow us to clear the profile and reboot the phone in the middle of a test. Or if we can trigger two different instances of B2G within the same Marionette test (seems unlikely). Once we have that, we should be able to test how the synchronization happens between two different sync clients. > Remark: once everything is landed we should formalize the review ownership > for this, probably something similar to the dialer (ie. an app directory + > very specific system app files). > Yes. We should be able to move this to a subfolder once bug 1201804 is fixed.
Assignee | ||
Updated•9 years ago
|
Attachment #8657355 -
Flags: review?(etienne)
Comment 10•9 years ago
|
||
Comment on attachment 8657355 [details] [review] [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master Awesome, thanks for addressing all the comments! > > > > Question: any ideas about how we're going to add integration "sanity" tests > > for this once all the moving parts will be in place? > > > > For functionally testing the SyncManager we'll need to finish Bug 1168185 > first and write some Marionette tests to test the Settings UI. > > For functionally testing the whole Sync feature, we need to check if > Marionette allow us to clear the profile and reboot the phone in the middle > of a test. Or if we can trigger two different instances of B2G within the > same Marionette test (seems unlikely). Once we have that, we should be able > to test how the synchronization happens between two different sync clients. Can we spawn a fake sync server with static content with the current marionette tooling? Without going all the way to testing 2 way sync it would be cool to have a sanity check marionette test involving settings + system + sync app.
Attachment #8657355 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Etienne Segonzac (:etienne) from comment #10) > Comment on attachment 8657355 [details] [review] > [gaia] ferjm:bug1196096.syncmanager > mozilla-b2g:master > > Awesome, thanks for addressing all the comments! > Thanks for the review :) > > > > > > Question: any ideas about how we're going to add integration "sanity" tests > > > for this once all the moving parts will be in place? > > > > > > > For functionally testing the SyncManager we'll need to finish Bug 1168185 > > first and write some Marionette tests to test the Settings UI. > > > > For functionally testing the whole Sync feature, we need to check if > > Marionette allow us to clear the profile and reboot the phone in the middle > > of a test. Or if we can trigger two different instances of B2G within the > > same Marionette test (seems unlikely). Once we have that, we should be able > > to test how the synchronization happens between two different sync clients. > > Can we spawn a fake sync server with static content with the current > marionette tooling? I'm not sure. But it'd be quite useful indeed. > Without going all the way to testing 2 way sync it would be cool to have a > sanity check marionette test involving settings + system + sync app. For testing this flow we don't really need the Sync server, just the Firefox Accounts one. This kind of stuff is what we need to investigate on bug 1202347. We'll work on that on the next sprint that starts on Monday :)
Assignee | ||
Comment 12•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/47c773889c03657919fd326ab7740ccab052ad3e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•9 years ago
|
Whiteboard: [partner-cherry-pick]
Reporter | ||
Updated•9 years ago
|
Whiteboard: [partner-cherry-pick]
Assignee | ||
Updated•9 years ago
|
Whiteboard: [partner-cherry-pick]
You need to log in
before you can comment on or make changes to this bug.
Description
•