Merge lp://qastaging/~nataliabidart/desktopcouch/no-hard-coded-consumer into lp://qastaging/desktopcouch

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 178
Merged at revision: 176
Proposed branch: lp://qastaging/~nataliabidart/desktopcouch/no-hard-coded-consumer
Merge into: lp://qastaging/desktopcouch
Diff against target: 112 lines (+23/-56)
1 file modified
desktopcouch/replication_services/ubuntuone.py (+23/-56)
To merge this branch: bzr merge lp://qastaging/~nataliabidart/desktopcouch/no-hard-coded-consumer
Reviewer Review Type Date Requested Status
Chad Miller (community) Approve
Review via email: mp+36792@code.qastaging.launchpad.net

Commit message

* Replication for Ubuntu One needs to get credentials from Ubuntu SSO (LP: #649320).

To post a comment you must log in.
Revision history for this message
Chad Miller (cmiller) wrote :

no-hard-coded-consumer$ PYTHONPATH=`pwd` bin/desktopcouch-service
WARNING:root:Starting up personal couchdb.
Removing stale, deceptive pid file.
Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///home/cmiller/.local/share/desktop-couch/couchdb.html
DEBUG:root:starting dbus main loop
INFO:root:Connecting to http://localhost:57539/.
INFO:root:Connecting to http://localhost:57539/.
DEBUG:root:found 1 self_identity records
INFO:LocationAdvertisement:starting advertising _couchdb_location._tcp on port 57539
DEBUG:replication:started replicating
INFO:root:Connecting to http://localhost:57539/.
DEBUG:replication:replication of discovered hosts finished
INFO:root:Connecting to http://localhost:57539/.
DEBUG:root:static pairings are [('fd98a23e-4fb3-410c-9146-4dee15d40d05', 'ubuntuone', True, True)]
DEBUG:replication:Looking up prefix for service 'ubuntuone'
DEBUG:replication:Looking up prefix for service 'ubuntuone'
ERROR:root:Could not get access token from sso.
Traceback (most recent call last):
  File "/home/cmiller/work/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication_services/ubuntuone.py", line 86, in __str__
    consumer = oauth.OAuthConsumer(oauth_data['consumer_key'],
TypeError: 'NoneType' object is unsubscriptable
replication 2010-09-27 17:16:27,321 - Could not get access token from sso.
Traceback (most recent call last):
  File "/home/cmiller/work/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication_services/ubuntuone.py", line 86, in __str__
    consumer = oauth.OAuthConsumer(oauth_data['consumer_key'],
TypeError: 'NoneType' object is unsubscriptable
WARNING:replication:Can't reach service ubuntuone. No access token.
replication 2010-09-27 17:16:27,323 - Can't reach service ubuntuone. No access token.
DEBUG:replication:finished replicating
DEBUG:root:starting replicator main loop
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 576, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 391, in _introspect_reply_handler
    self._introspect_execute_queue()
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 378, in _introspect_execute_queue
    proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 132, in __call__
    **keywords)
TypeError: call_async() got an unexpected keyword argument 'bus_interface'
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 576, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 391, in _introspect_reply_handler
    self._introspect_execute_queue()
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 378, in _introspect_execute_queue
    proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 132, in __call__
    **keywords)
TypeError: call_async() got an unexpected keyword argument 'bus_interface'

review: Needs Fixing
Revision history for this message
Eric Casteleijn (thisfred) wrote :

I get a different error on lucid, but that may be because desktopcouch trunk is not meant to work there:

INFO:root:Connecting to http://localhost:36900/.
DEBUG:root:starting dbus main loop
INFO:root:Connecting to http://localhost:36900/.
DEBUG:root:found 1 self_identity records
INFO:LocationAdvertisement:starting advertising _couchdb_location._tcp on port 36900
DEBUG:replication:started replicating
INFO:root:Connecting to http://localhost:36900/.
DEBUG:replication:replication of discovered hosts finished
INFO:root:Connecting to http://localhost:36900/.
DEBUG:root:static pairings are [('5c4829ed-d0ca-4c7e-ac59-68a79626bd44', 'ubuntuone', True, True)]
DEBUG:replication:Looking up prefix for service 'ubuntuone'
ERROR:replication:replication of services aborted
Traceback (most recent call last):
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication.py", line 140, in do_all_replication
    remote_oauth_data = oauth_info_for_service(sn)
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication.py", line 64, in oauth_info_for_service
    return getattr(mod, service_name).get_oauth_data()
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication_services/ubuntuone.py", line 49, in get_oauth_data
    proxy = bus.get_object(ubuntu_sso.DBUS_BUS_NAME,
AttributeError: 'module' object has no attribute 'DBUS_BUS_NAME'
replication 2010-09-27 17:23:26,439 - replication of services aborted
Traceback (most recent call last):
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication.py", line 140, in do_all_replication
    remote_oauth_data = oauth_info_for_service(sn)
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication.py", line 64, in oauth_info_for_service
    return getattr(mod, service_name).get_oauth_data()
  File "/home/eric/canonical/desktopcouch/no-hard-coded-consumer/desktopcouch/replication_services/ubuntuone.py", line 49, in get_oauth_data
    proxy = bus.get_object(ubuntu_sso.DBUS_BUS_NAME,
AttributeError: 'module' object has no attribute 'DBUS_BUS_NAME'

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Errors should be fixed now.

Revision history for this message
Chad Miller (cmiller) wrote :

I removed keys from gnomekeyring/seahorse. I then started desktopcouch-service, and got empty dicts back for tokens. Those were accessed around line 79 of desktopcouch/replication_services/ubuntuone.py for some key. That fails, so stops replication with a message in the log. Not a big deal.

I then started up syncdaemon, and reauthorized myself. I changed my DNS resolver to use prod (instead of staging), and got ServerError: (503, '') .

thisfred still works on the server end.

Revision history for this message
Chad Miller (cmiller) wrote :

Aside from the minor ugliness of the KeyError on lin 79, this looks good to me.

review: Approve
Revision history for this message
dobey (dobey) wrote :
Download full text (51.5 KiB)

The attempt to merge lp:~nataliabidart/desktopcouch/no-hard-coded-consumer into lp:desktopcouch failed. Below is the output from the failed tests.

running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/stop_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/replication.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/local_files.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/__init__.py -> build/lib.linux-i686-2.6/desktopcouch
creating build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_local_files.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_replication.py -> build/lib.linux-i686-2.6/desktopcouch/tests
creating build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/record.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
creating build/lib.linux-i686-2.6/desktopcouch/pair
copying desktopcouch/pair/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/pair
creating build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/field_registry.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/record.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/couchgrid.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server_base.py -> build/lib.linux-i686-2.6/desktopcouch/records
creating build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/ubuntuone.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/example.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
creating build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/record.py -> build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/notes
creating build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/record.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
creating build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/record.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/view.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/co...

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