Merge lp://qastaging/~renatofilho/sync-monitor/check-network into lp://qastaging/sync-monitor
- check-network
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Bill Filler | ||||||||
Approved revision: | 53 | ||||||||
Merged at revision: | 38 | ||||||||
Proposed branch: | lp://qastaging/~renatofilho/sync-monitor/check-network | ||||||||
Merge into: | lp://qastaging/sync-monitor | ||||||||
Diff against target: |
837 lines (+338/-74) 13 files modified
CMakeLists.txt (+1/-0) src/CMakeLists.txt (+4/-2) src/eds-helper.cpp (+9/-4) src/eds-helper.h (+1/-1) src/sync-account.cpp (+11/-3) src/sync-account.h (+1/-2) src/sync-daemon.cpp (+155/-54) src/sync-daemon.h (+10/-2) src/sync-dbus.cpp (+14/-2) src/sync-network.cpp (+51/-0) src/sync-network.h (+48/-0) src/sync-queue.cpp (+29/-4) src/sync-queue.h (+4/-0) |
||||||||
To merge this branch: | bzr merge lp://qastaging/~renatofilho/sync-monitor/check-network | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bill Filler (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email:
|
Commit message
Check for network connection before sync.
Append sync request to run later if no network.
Description of the change
- 39. By Renato Araujo Oliveira Filho
-
Append sync request to run later if no network.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 40. By Renato Araujo Oliveira Filho
-
avoid infinity loop.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:40
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 41. By Renato Araujo Oliveira Filho
-
set m_syncing to false after cancel sync due network status.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:41
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 42. By Renato Araujo Oliveira Filho
-
Reverted to 60 ms wait before a sync;
Removed some debug messages from network helper class.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:42
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Bill Filler (bfiller) wrote : | # |
Issues:
- if I turn off wifi, the sync still happens
- when wifi is on, as soon as I modify a contact the sync button goes gray but sync monitor delays 60 seconds until it starts the sync. The button shouldn't go gray until an actual sync is in progress. The delay before starting the sync seems much larger now.
- When I turn on flight mode, then sync monitor thinks I'm offline correctly. If I modify a contact during that time the sync button turns gray even though it's not syncing.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Bill Filler (bfiller) wrote : | # |
Also, I rebooted with wifi turned off and I got a sync error. This was in the log:
"[10/28/14 6:48 PM] Start sync: <email address hidden> (contacts)"^M
Progress 0^M
Sync Report^M
"dir" : "/home/
"^M
"end" : "1414536541"^M
"error" : "error code from SyncEvolution fatal error (local, status 10500): no so
urces active, check configuration"^M
"peer" : "google-
"start" : "1414536538"^M
"status" : "10500"^M
"[10/28/14 6:49 PM] Sync done: <email address hidden> (contacts) Status: 10500 Error: Unknown s
tatus Duration: 2s"^M
This is with this MR installed to start sync-monitor after address-book and unity8: https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
> Issues:
> - if I turn off wifi, the sync still happens
> - when wifi is on, as soon as I modify a contact the sync button goes gray but
> sync monitor delays 60 seconds until it starts the sync. The button shouldn't
> go gray until an actual sync is in progress. The delay before starting the
> sync seems much larger now.
> - When I turn on flight mode, then sync monitor thinks I'm offline correctly.
> If I modify a contact during that time the sync button turns gray even though
> it's not syncing.
Yes I increased the delay to start the automatic sync. But it should not affect the manual sync ( I will check that).
Could you paste the sync-monitor log. It should show if the sync really happens or if it was postponed due the network.
The correct steps should be:
1 - Contact change
2 - Sync monitor waits 1 min (to avoid multiple syncs) before start the sync
3 - Sync monitor starts to sync
4 - Sync monitor checks network status
5 - If network is down postpone the sync until the network became available
Probably you are seeing the button gray (but this does not mean that the sync is happening, this mean that there is a sync in the queue). I will try to make the button gray only when syncing, to avoid problems.
- 43. By Renato Araujo Oliveira Filho
-
Update dbus helper class to only return state "syncing" when the sync is running and not during a pending sync.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:43
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 44. By Renato Araujo Oliveira Filho
-
Fixed sync state report.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:44
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Bill Filler (bfiller) wrote : | # |
Here is the full log when the sync fails at startup:
"[10/29/14 7:49 AM] Start sync: <email address hidden> (contacts)"
Progress 0
Progress 0
Loaded tempaltes: ("google", "yahoo")
Loading accounts...
Found account: "<email address hidden>"
Supported sevices for protocol: "google" ("calendar", "contacts")
Services available for: "<email address hidden>" QMap(("calendar", false)("contacts", true))
Found account: "<email address hidden>"
Supported sevices for protocol: "google" ("calendar", "contacts")
Services available for: "<email address hidden>" QMap(("calendar", false)("contacts", true))
Found account: "bill.filler"
Found account: "bfiller"
Found account: "<email address hidden>"
syn requested for account: "<email address hidden>" "contacts"
Pushed into queue
Network state changed: Online
Network is online sync pending changes
Sync requested service: "<email address hidden>" "contacts"
Configure account for service: "<email address hidden>" "contacts" "disabled"
start configure for services ("contacts")
config session created "google-
account config done "<email address hidden>" "contacts"
"[10/29/14 11:55 AM] Start sync: <email address hidden> (contacts)"
Progress 0
Sync Report
"dir" : "/home/
"end" : "1414598124"
"error" : "error code from SyncEvolution fatal error (local, status 10500): no sources active, check configuration"
"peer" : "google-
"start" : "1414598121"
"status" : "10500"
"[10/29/14 11:55 AM] Sync done: <email address hidden> (contacts) Status: 10500 Error: Unknown status Duration: 2s"
Network state changed: Offline
Network state changed: Online
Network is online sync pending changes
Sync error "<email address hidden>" "contacts" "canceled"
- 45. By Renato Araujo Oliveira Filho
-
Check queue size before start sync after network state changed.
- 46. By Renato Araujo Oliveira Filho
-
disable sync option is the server is not online.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:46
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 47. By Renato Araujo Oliveira Filho
-
Fixed sync in a loop when fails.
Fixed crash when sync get canceled due network going down.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:47
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 48. By Renato Araujo Oliveira Filho
-
Force sync to start if it was manually requested.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:48
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 49. By Renato Araujo Oliveira Filho
-
Set idle state in account where the sync was canceled.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:49
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 50. By Renato Araujo Oliveira Filho
-
Make sure that pending sync get synced after device went online.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:50
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 51. By Renato Araujo Oliveira Filho
-
delay sync after network went online to give it some time to full stabilish.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:51
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 52. By Renato Araujo Oliveira Filho
-
Automatically retry the sync for some buggy cases.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:52
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 53. By Renato Araujo Oliveira Filho
-
Fixed dbus sync state report.
Avoid sync the same account twice.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:53
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Bill Filler (bfiller) wrote : | # |
tested according to "Test Network" section of test plan. All working.
PASSED: Continuous integration, rev:39 jenkins. qa.ubuntu. com/job/ sync-monitor- ci/71/ jenkins. qa.ubuntu. com/job/ sync-monitor- utopic- amd64-ci/ 19 jenkins. qa.ubuntu. com/job/ sync-monitor- utopic- armhf-ci/ 19 jenkins. qa.ubuntu. com/job/ sync-monitor- utopic- armhf-ci/ 19/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ sync-monitor- utopic- i386-ci/ 19
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/sync- monitor- ci/71/rebuild
http://