Merge lp:~facundo/ubuntuone-client/discriminate-auth-error into lp:ubuntuone-client
Proposed by
Facundo Batista
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | dobey | ||||
Approved revision: | 258 | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~facundo/ubuntuone-client/discriminate-auth-error | ||||
Merge into: | lp:ubuntuone-client | ||||
Diff against target: |
37 lines 1 file modified
ubuntuone/syncdaemon/action_queue.py (+14/-3) |
||||
To merge this branch: | bzr merge lp:~facundo/ubuntuone-client/discriminate-auth-error | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
John Lenton (community) | Approve | ||
Review via email: mp+13490@code.launchpad.net |
Commit message
Distinguish between Auth failure and other errors.
To post a comment you must log in.
Distinguish between Auth failure and other errors.
Now, we only go to AUTH_ERROR state if the Auth effectively failed; if something else happens, we go to unknown error, not provoking the applet to drop the token.
Here are snippets of the log for each situation, tested IRL with this changes (and lp:~facundo/ubuntuone-storage-protocol/discriminate_auth_error also applied):
Authentication OK:
State - DEBUG - START_SET_ CAPABILITIES --[SYS_ SET_CAPABILITIE S_OK]-- > START_AUTHENTIC ATING ctedSDState START_AUTHENTIC ATING>}
EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <NonActiveConne
ActionQueue - INFO - Oauth OK
EQ - DEBUG - push_event: SYS_OAUTH_OK, args:(), kw:{}
Authentication FAIL:
State - DEBUG - START_SET_ CAPABILITIES_ WITH_METAQ --[SYS_ SET_CAPABILITIE S_OK]-- > START_AUTHENTIC ATING_WITH_ METAQ ATING_WITH_ METAQ>} FAILED _FAILED' } ATING_WITH_ METAQ --[SYS_ OAUTH_ERROR] --> AUTH_FAILED
EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <SyncDaemonState START_AUTHENTIC
ActionQueue - ERROR - OAuth failed: AUTHENTICATION_
EQ - DEBUG - push_event: SYS_OAUTH_ERROR, args:(), kw:{'error': 'AUTHENTICATION
State - DEBUG - Event arrived: cancelling timeout watchdog
ActionQueue - DEBUG - disconnected
State - DEBUG - START_AUTHENTIC
EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <AQErrorState AUTH_FAILED>}
Server answered INTERNAL_ERROR:
State - DEBUG - START_SET_ CAPABILITIES_ WITH_METAQ --[SYS_ SET_CAPABILITIE S_OK]-- > START_AUTHENTIC ATING_WITH_ METAQ ATING_WITH_ METAQ>} ATING_WITH_ METAQ --[SYS_ UNKNOWN_ ERROR]- -> UNKNOWN_ERROR
EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <SyncDaemonState START_AUTHENTIC
ActionQueue - ERROR - StorageRequestError during OAuth: INTERNAL_ERROR
EQ - DEBUG - push_event: SYS_UNKNOWN_ERROR, args:(), kw:{}
State - DEBUG - Event arrived: cancelling timeout watchdog
EQ - DEBUG - push_event: SYS_DISCONNECT, args:(), kw:{}
HQ - INFO - HashQueue: _hasher stopped
DBus - INFO - Shuttingdown DBusInterface!
ActionQueue - DEBUG - disconnected
State - DEBUG - START_AUTHENTIC
EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <AQErrorState UNKNOWN_ERROR>}