Merge lp://qastaging/~mikemc/ubuntuone-control-panel/remote-folders-fix into lp://qastaging/ubuntuone-control-panel

Proposed by Mike McCracken
Status: Merged
Approved by: Brian Curtin
Approved revision: 362
Merged at revision: 381
Proposed branch: lp://qastaging/~mikemc/ubuntuone-control-panel/remote-folders-fix
Merge into: lp://qastaging/ubuntuone-control-panel
Diff against target: 148 lines (+33/-14)
4 files modified
ubuntuone/controlpanel/gui/qt/controlpanel.py (+10/-5)
ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py (+3/-4)
ubuntuone/controlpanel/gui/qt/tests/test_wizard.py (+16/-5)
ubuntuone/controlpanel/gui/qt/wizard.py (+4/-0)
To merge this branch: bzr merge lp://qastaging/~mikemc/ubuntuone-control-panel/remote-folders-fix
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
Roberto Alsina (community) check conflict resolution Approve
Diego Sarmentero (community) Approve
Review via email: mp+126037@code.qastaging.launchpad.net

Commit message

- Connect files service in wizard to enable display of remote folders. (LP: #978043)

Description of the change

- Connect files service in wizard to enable display of remote folders. (LP: #978043)

Summary:

The remote folders panel requires a syncdaemon with an active actionqueue to process the ListVolumes action, in order to display the remote folders. Connecting the files service makes that happen.

To test:

- remove your credentials, kill syncdaemon
(OR start on a new user account)
- open control panel, log in with your existing account
- does the first wizard page hang with a loading overlay or show remote folders?
(It should show remote folders)

Gritty Details:

CloudToComputer page uses folders.py RemoteFoldersPanel, which calls
backend.py volumes_info() with refresh=True. Setting refresh=True
means it'll call sd_client.refresh_volumes(), which eventually calls
interaction_interfaces.py refresh_volumes(), which calls
volume_manager.py refresh_volumes(), which calls action_queue.py
list_volumes(), which queues a ListVolumes class, which gets stuck
because the queue is inactive, and won't get re-enabled until we are
done with the wizard, which triggers on_wizard_finished() in
controlpanel.py, which calls on_credentials_found() and that'll start
the queue, but by then it's too late.

The fix is to call backend.connect_files() in wizard.py
_process_credentials(), so that the queue is active when we load the
CloudToComputerPage. To work, this has to actually connect, so it
ignores the autoconnect setting, which I assert is OK because we
probably don't get to this page with non-default settings, and
autoconnect is on by default.

So, how does the folders tab in the main management UI work when
autoconnect is False? If the main control panel found creds, then
it'll check autoconnect and if it's false, it doesn't call
backend.connect_files(). It just goes ahead and shows the folders tab
However, the folders tab calls backend.volumes_info() with
refresh=False, so none of that stuff above happens, and it doesn't
matter what state the queue is in (hence it doesn't matter if
autoconnect is enabled or not, the folders tab will still work).

To post a comment you must log in.
358. By Mike McCracken

merge with trunk

359. By Mike McCracken

Test calling connect_files after receiving credentials.

Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
360. By Mike McCracken

merge with trunk and resolve conflict

Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve (check conflict resolution)
361. By Mike McCracken

merge with trunk and resolve conflict in controlpanel.py

362. By Mike McCracken

merge with current trunk

Revision history for this message
Brian Curtin (brian.curtin) wrote :

Approved on Windows. Code looks good, tests pass, and IRL on Windows looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches