Merge lp:~mterry/ubuntuone-couch/auth-fixes into lp:ubuntuone-couch

Proposed by Michael Terry
Status: Rejected
Rejected by: Natalia Bidart
Proposed branch: lp:~mterry/ubuntuone-couch/auth-fixes
Merge into: lp:ubuntuone-couch
Diff against target: 34 lines (+3/-3)
2 files modified
ubuntuone/couch/auth.py (+2/-2)
ubuntuone/tests/test_auth.py (+1/-1)
To merge this branch: bzr merge lp:~mterry/ubuntuone-couch/auth-fixes
Reviewer Review Type Date Requested Status
dobey (community) Approve
Review via email: mp+111459@code.launchpad.net

Commit message

Fix the import for the dbus_service module renaming.
Increase the request timeout to 30 seconds per megabyte.

Description of the change

This branch fixes two issues:

Recently, some code moved around in ubuntuone-client, so we have to fix our import.

Secondly, some users in bug 844369 (time outs in Deja Dup uploading) have reported that increasing the timeout per-megabyte from 10s to 30s helped those on slow connections. So I'm proposing that change in this branch too.

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

Looks ok to me. But it would be nice to have a bug for this. Can you open one, and commit --unchanged --fixes=lp:$BUGNUM to link it to this branch? Thanks.

review: Needs Information
Revision history for this message
Michael Terry (mterry) wrote :

Done! Please commit as you see fit. (I linked this bug to bug 844369, but I'm not 100% confident it will actually fix it, just help ameliorate it).

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:~mterry/ubuntuone-couch/auth-fixes into lp:ubuntuone-couch failed. Below is the output from the failed tests.

Running test suite for ubuntuone
Adding path
Xlib: extension "RANDR" missing on display ":99".
Traceback (most recent call last):
  File "/usr/bin/u1trial", line 269, in <module>
    main()
  File "/usr/bin/u1trial", line 265, in main
    TestRunner(force_gc=options.force_gc).run(args, options)
  File "/usr/bin/u1trial", line 187, in run
    options.ignored_paths))
  File "/usr/bin/u1trial", line 162, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/usr/bin/u1trial", line 90, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/mnt/tarmac/cache/ubuntuone-couch/trunk/ubuntuone/tests/test_couch.py", line 23, in <module>
    from ubuntuone.couch import (
  File "/mnt/tarmac/cache/ubuntuone-couch/trunk/ubuntuone/couch/__init__.py", line 23, in <module>
    from ubuntuone.couch.auth import (
  File "/mnt/tarmac/cache/ubuntuone-couch/trunk/ubuntuone/couch/auth.py", line 26, in <module>
    from ubuntuone.platform.credentials.dbus_service import (
ImportError: No module named dbus_service

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

The attempt to merge lp:~mterry/ubuntuone-couch/auth-fixes into lp:ubuntuone-couch failed. Below is the output from the failed tests.

Running test suite for ubuntuone
Traceback (most recent call last):
  File "/usr/bin/u1trial", line 341, in <module>
    main()
  File "/usr/bin/u1trial", line 321, in main
    suite = trial_runner.get_suite(config)
  File "/usr/bin/u1trial", line 192, in get_suite
    config['ignore-paths']))
  File "/usr/bin/u1trial", line 176, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/usr/bin/u1trial", line 116, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/mnt/tarmac/cache/ubuntuone-couch/trunk/ubuntuone/tests/test_auth.py", line 25, in <module>
    from ubuntuone.platform.credentials.linux import (
ImportError: No module named linux

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

The attempt to merge lp:~mterry/ubuntuone-couch/auth-fixes into lp:ubuntuone-couch failed. Below is the output from the failed tests.

Running test suite for ubuntuone
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.SuperNotCalled: SuperNotCalled for ubuntuone.tests.test_couch.QueryTestCase.tearDown
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.SuperNotCalled: SuperNotCalled for ubuntuone.tests.test_couch.QueryTestCase.setUp
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.MissingReturnValue: MissingReturnValue for ubuntuone.tests.test_couch.QueryTestCase.setUp
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.MissingReturnValue: MissingReturnValue for ubuntuone.tests.test_couch.QueryTestCase.tearDown
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.SuperNotCalled: SuperNotCalled for ubuntuone.tests.test_auth.QueryTestCase.tearDown
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.SuperNotCalled: SuperNotCalled for ubuntuone.tests.test_auth.QueryTestCase.setUp
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.MissingReturnValue: MissingReturnValue for ubuntuone.tests.test_auth.QueryTestCase.setUp
[FAIL]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/testing/txcheck.py", line 362, in run
    raise problem
ubuntuone.devtools.testing.txcheck.MissingReturnValue: MissingReturnValue for ubuntuone.tests.test_auth.QueryTestCase.tearDown
[FAIL]
ubuntuone.tests.test_couch
  QueryTestCase
    test_get_user_info ... [OK]
    test_get_user_info_404 ... [OK]
    test_request ... [OK]
    test_request_400 ... [OK]
    test_request_401 ... [OK]
    test_request_911 ... [OK]
    test_request_all_dbs ... [OK]
    test_request_all_dbs_with...

Revision history for this message
Michael Terry (mterry) wrote :

These test failures didn't seem related to this branch. Can this merge be tried again?

Revision history for this message
dobey (dobey) wrote :

On Wed, 2012-08-01 at 16:08 +0000, Michael Terry wrote:
> These test failures didn't seem related to this branch. Can this
> merge be tried again?

They are unrelated, but they will just occur again. The failures are due
to a check in the test runner, for which ubuntuone-couch has not been
updated to deal with.

The branch is fine though, and I think it's fine to ship those changes
as a patch in the Ubuntu package of ubuntuone-couch for now. I'll see if
I can't come up with a better solution in the next couple of weeks, to
allow us to drop ubuntuone-couch completely out of the archive for beta.

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

The attempt to merge lp:~mterry/ubuntuone-couch/auth-fixes into lp:ubuntuone-couch failed. Below is the output from the failed tests.

Running test suite for ubuntuone
Traceback (most recent call last):
  File "/usr/bin/u1trial", line 337, in <module>
    main()
  File "/usr/bin/u1trial", line 313, in main
    'installed. You can find it here: %s' % reactor.REACTOR_URL)
AttributeError: 'module' object has no attribute 'REACTOR_URL'

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

Setting MP as Rejected to reduce numbers of landing candidates in @reviewlist.
Change status again if this MP is still current.

Unmerged revisions

17. By Michael Terry

and fix a test usage of credentials.linux

16. By Michael Terry

fix import and add more time for requests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/couch/auth.py'
2--- ubuntuone/couch/auth.py 2011-10-19 16:07:17 +0000
3+++ ubuntuone/couch/auth.py 2012-07-11 17:40:23 +0000
4@@ -23,7 +23,7 @@
5 from oauth import oauth
6 from dbus.mainloop.glib import DBusGMainLoop
7
8-from ubuntuone.platform.credentials.linux import (
9+from ubuntuone.platform.credentials.dbus_service import (
10 DBUS_BUS_NAME,
11 DBUS_CREDENTIALS_PATH,
12 )
13@@ -141,7 +141,7 @@
14 parameters[key] = value[0]
15
16 request_len = len(request_body) if request_body else 0
17- timeout = 10 * (request_len / 1024 / 1024 + 1) # 10 seconds per megabyte
18+ timeout = 30 * (request_len / 1024 / 1024 + 1) # 30 seconds per megabyte
19
20 oauth_header = get_oauth_request_header(
21 consumer, token, url, http_method, signature_method, parameters)
22
23=== modified file 'ubuntuone/tests/test_auth.py'
24--- ubuntuone/tests/test_auth.py 2011-10-19 16:07:17 +0000
25+++ ubuntuone/tests/test_auth.py 2012-07-11 17:40:23 +0000
26@@ -22,7 +22,7 @@
27 from ubuntuone.couch.auth import (
28 HMAC_SHA1, get_oauth_request_header, get_oauth_credentials,
29 get_oauth_token, request, CredentialsNotFound, NO_CREDENTIALS)
30-from ubuntuone.platform.credentials.linux import (
31+from ubuntuone.platform.credentials.dbus_service import (
32 DBUS_BUS_NAME,
33 DBUS_CREDENTIALS_PATH,
34 )

Subscribers

People subscribed via source and target branches