Merge lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only into lp://qastaging/ubuntuone-control-panel

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 394
Merged at revision: 396
Proposed branch: lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only
Merge into: lp://qastaging/ubuntuone-control-panel
Diff against target: 527 lines (+266/-78)
2 files modified
ubuntuone/controlpanel/gui/qt/share_links_search.py (+49/-33)
ubuntuone/controlpanel/gui/qt/tests/test_share_links_search.py (+217/-45)
To merge this branch: bzr merge lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only
Reviewer Review Type Date Requested Status
dobey (community) Approve
Michał Karnicki (community) Approve
Review via email: mp+144817@code.qastaging.launchpad.net

Commit message

- Do all filename searching via IPC - allows fuzzy searching and avoids display bug with fast typing.

Description of the change

- Do all filename searching via IPC - allows fuzzy searching and avoids display bug with fast typing.

Changes to do all filename searching/filtering over IPC instead of
using IPC for the first letter and in-process filtering for the
remainder. This lets us actually use the fuzzy, case-insensitive
searching from syncdaemon.

Uses reactor.callLater to delay and then coalesce IPC calls, reducing
IPC traffic.

Avoids updating results popup while searches are in progress, so that
result-paginating code does not get confused by fast typing.

Adds tests for the above changes - testing delayed call logic and a
specific test for the fast-typing bug fix. Removed testing of filename
filtering, because that is now done in syncdaemon.

Some variable/method names were no longer properly descriptive, and
were changed for clarity.

TESTS:
tests pass on darwin/linux using python-mock (which is in buildout for darwin/windows, and installable for linux, will soon be in package deps)

IRL TEST:

assuming a file named something like ~/Ubuntu One/razzle/dazzle.txt :

1. open CP, and in the share links search box, type 'RAZZ DAZZ'. this should show that file.
so should the query 'raz daz' , etc.

2. typing 'daz' really fast should show the file. Prior to this branch, it was possible to type letters fast enough to confuse the pagination and display no matching results despite there being a match. This happened for me with a query 'bro', which should have matched about 50 files, showed no results, while typing 'b'…'r'…'o', worked correctly.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) wrote :

Looks good.

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

The attempt to merge lp:~mikemc/ubuntuone-control-panel/file-search-ipc-only into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

*** Running DBus test suite ***
Falling back to glib2reactor module.

Traceback (most recent call last):
  File "/usr/bin/u1trial", line 40, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 277, in main
    suite = test_runner.get_suite(options)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 173, in get_suite
    config['ignore-paths']))
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 157, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 98, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/mnt/tarmac/cache/ubuntuone-control-panel/trunk/ubuntuone/controlpanel/dbustests/__init__.py", line 28, in <module>
    from ubuntuone.controlpanel import dbus_service
  File "/mnt/tarmac/cache/ubuntuone-control-panel/trunk/ubuntuone/controlpanel/dbus_service.py", line 22, in <module>
    from gi.repository import GObject
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 68, in load_module
    dynamic_module._load()
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 291, in _load
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  File "/usr/lib/python2.7/dist-packages/gi/overrides/GObject.py", line 533, in <module>
    Object = override(Object)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 75, in override
    registry.register(type_)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 49, in register
    self[override_class] = override_class
  File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 33, in __setitem__
    raise TypeError('Can not override a type %s, which is not in a gobject introspection typelib' % value.__name__)
TypeError: Can not override a type Object, which is not in a gobject introspection typelib

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (46.8 KiB)

The attempt to merge lp:~mikemc/ubuntuone-control-panel/file-search-ipc-only into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

*** Running DBus test suite ***
ubuntuone.controlpanel.dbustests.test_dbus_service
  BaseTestCase
    runTest ... [OK]
  DBusServiceMainTestCase
    test_dbus_service_cant_register ... Control panel backend already running.
                                   [OK]
    test_dbus_service_main ... [OK]
  DBusServiceTestCase
    test_cant_register_twice ... [SKIPPED]
    test_dbus_busname_created ... [OK]
    test_error_handler_default ... [OK]
    test_error_handler_with_exception ... [OK]
    test_error_handler_with_failure ... [OK]
    test_error_handler_with_non_string_dict ... [OK]
    test_error_handler_with_string_dict ... [OK]
    test_register_service ... [OK]
  FileSyncTestCase
    test_file_sync_status_changed ... [OK]
    test_file_sync_status_disabled ... [OK]
    test_file_sync_status_disconnected ... [OK]
    test_file_sync_status_error ... [OK]
    test_file_sync_status_idle ... [OK]
    test_file_sync_status_starting ... [OK]
    test_file_sync_status_stopped ... [OK]
    test_file_sync_status_syncing ... [OK]
    test_file_sync_status_unknown ... [OK]
    test_status_changed_handler ... [OK]
    test_status_changed_handler_after_status_requested ... [OK]
    test_status_changed_handler_after_status_requested_twice ... [OK]
  OperationsAuthErrorTestCase
    test_account_info_returned ... [OK]
    test_change_device_settings ... [OK]
    test_change_replication_settings ... [OK]
    test_change_volume_settings ... [OK]
    test_connect_files ... [OK]
    test_devices_info_returned ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_remove_device ... [OK]
    test_replications_info ... [OK]
    test_restart_files ... [OK]
    t...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (54.7 KiB)

The attempt to merge lp:~mikemc/ubuntuone-control-panel/file-search-ipc-only into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

*** Running DBus test suite ***
ubuntuone.controlpanel.dbustests.test_dbus_service
  BaseTestCase
    runTest ... [OK]
  DBusServiceMainTestCase
    test_dbus_service_cant_register ... Control panel backend already running.
                                   [OK]
    test_dbus_service_main ... [OK]
  DBusServiceTestCase
    test_cant_register_twice ... [SKIPPED]
    test_dbus_busname_created ... [OK]
    test_error_handler_default ... [OK]
    test_error_handler_with_exception ... [OK]
    test_error_handler_with_failure ... [OK]
    test_error_handler_with_non_string_dict ... [OK]
    test_error_handler_with_string_dict ... [OK]
    test_register_service ... [OK]
  FileSyncTestCase
    test_file_sync_status_changed ... [OK]
    test_file_sync_status_disabled ... [OK]
    test_file_sync_status_disconnected ... [OK]
    test_file_sync_status_error ... [OK]
    test_file_sync_status_idle ... [OK]
    test_file_sync_status_starting ... [OK]
    test_file_sync_status_stopped ... [OK]
    test_file_sync_status_syncing ... [OK]
    test_file_sync_status_unknown ... [OK]
    test_status_changed_handler ... [OK]
    test_status_changed_handler_after_status_requested ... [OK]
    test_status_changed_handler_after_status_requested_twice ... [OK]
  OperationsAuthErrorTestCase
    test_account_info_returned ... [OK]
    test_change_device_settings ... [OK]
    test_change_replication_settings ... [OK]
    test_change_volume_settings ... [OK]
    test_connect_files ... [OK]
    test_devices_info_returned ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_remove_device ... [OK]
    test_replications_info ... [OK]
    test_restart_files ... [OK]
    t...

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