Diff for "PythonMigrationStatus"

Not logged in - Log In / Register

Differences between revisions 159 and 160
Revision 159 as of 2010-04-15 06:05:20
Size: 9659
Editor: wgrant
Comment:
Revision 160 as of 2010-04-15 08:08:31
Size: 8432
Editor: maxb
Comment: Remove old test results, consolidate list of issues needing revisiting.
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
== Known/Open issues == == Issues that need revisiting ==
Line 16: Line 16:
 * Things partially dealt with by Salgado, who's going on leave and might not be able to finish them:
 
* The failure when setting up the GoogleServiceLayer seems to be a consequence of the server answering with a errno.ECONNABORTED when it's not yet ready, so I've just changed the wait_for_service function to treat that error the same way it does for errno.ECONNREFUSED.
  * The test hang is because of the change done on bug Bug:349316, so I've just commented out that addCleanup() line for now, to see if we can get a full test run.
 * The failure when setting up the GoogleServiceLayer seems to be a consequence of the server answering with a errno.ECONNABORTED when it's not yet ready, so salgado has just changed the wait_for_service function to treat that error the same way it does for errno.ECONNREFUSED.
 * The test hang is because of the change done on bug Bug:349316, so salgado has just commented out that addCleanup() line for now, to see if we can get a full test run.
 * A multitude of modules of modules (sha, md5, sets, ...) are deprecated in Python 2.6, and many tests would fail merely because of unexpected !DeprecationWarnings, so we
've had to jump through multiple hoops all over the place to suppress these. Ultimately we need a plan for removing these suppressions, because we ''want'' to know about deprecation long-term.
Line 20: Line 20:
I ran the test suite with devel r10700, the python2.6 branch, and the two Python 2.6-related branches that landed overnight.

Full log is here: [[attachment:tests-20100414.log]]

Total: 25792 tests, 25 failures, 9 errors in 204 minutes 11.495 seconds.

Unfortunately I forgot to stop my launchpad-buildd before running the suite, so some test failures are spurious:

 * test_manager
 * buildd-dispatching.txt
 * BuilddSlaveTestSetup
 * translationtemplatesbuildbehavior.txt

And three are known Lucid failures:

 * xx-distribution.txt (fixed in lazr.restful, but not yet used by LP)
 * soyuz-upload.txt (apt-ftparchive hash changes)
 * test_generateConfig (ditto)


=== Old results ===

With the two changes above I was able to get the test suite to run to completion:
Total: 25856 tests, 71 failures, 119 errors in 300 minutes 55.792 seconds.

Here's the full log: [[attachment:tests.log]]

 * This appears to have been run without the Lucid pygpgme fix, so there are lots of "Unknown error code" failures in Soyuz and a couple of Registry tests. I'm rerunning the Soyuz-related tests to see what the real failures are. -- ''wgrant''

=== Things needing revising ===

A multitude of modules of modules (sha, md5, sets, ...) are deprecated in Python 2.6, and many tests would fail merely because of unexpected !DeprecationWarnings, so we've had to jump through multiple hoops all over the place to suppress these. Ultimately we need a plan for removing these suppressions, because we ''want'' to know about deprecation long-term.

=== Setup caveat ===
== Setup caveats ==
Line 65: Line 32:
=== Cleanup potential === == Cleanup potential ==
Line 104: Line 71:
Line 108: Line 74:

=== LaunchpadScriptLayer: OK ===

=== LaunchpadZopelessLayer ===
=== LaunchpadScriptLayer: OK (85 tests) ===
n=== LaunchpadZopelessLayer ===
Line 148: Line 112:
Line 153: Line 116:
=== DatabaseFunctionalLayer: OK (4461 tests) === === DatabaseFunctionalLayer: OK (4467 tests) ===
Line 155: Line 118:
=== PageTestLayer === === PageTestLayer: OK (6335 tests) ===
Line 158: Line 121:
=== TwistedAppServerLayer ===
=== TwistedAppServerLayer: OK (9 tests) ===
Line 164: Line 126:
=== ZopelessDatabaseLayer: OK ===
=== BugsWindmillLayer: OK (12 tests) ===
=== CodeWindmillLayer: OK (11 tests) ===
=== ForeignBranchPluginLayer: OK ===
=== ZopelessDatabaseLayer: OK (259 tests) ===
=== BugsWindmillLayer: OK (13 tests) ===
=== CodeWindmillLayer: OK (12 tests) ===
=== ForeignBranchPluginLayer: OK (61 tests) ===

Moving to newer Python versions

With Lucid fast approaching, efforts to actually migrate Launchpad to Python 2.6 are getting under way.

Relevant tagged bugs: https://bugs.launchpad.net/launchpad-foundations/+bugs?field.tag=python-upgrade

Branches

Issues that need revisiting

  • The failure when setting up the GoogleServiceLayer seems to be a consequence of the server answering with a errno.ECONNABORTED when it's not yet ready, so salgado has just changed the wait_for_service function to treat that error the same way it does for errno.ECONNREFUSED.

  • The test hang is because of the change done on bug 349316, so salgado has just commented out that addCleanup() line for now, to see if we can get a full test run.

  • A multitude of modules of modules (sha, md5, sets, ...) are deprecated in Python 2.6, and many tests would fail merely because of unexpected DeprecationWarnings, so we've had to jump through multiple hoops all over the place to suppress these. Ultimately we need a plan for removing these suppressions, because we want to know about deprecation long-term.

Setup caveats

  • The extension modules in your sourcecode directory will have been built for Python 2.5 and these will break for your 2.6 branch. The simple thing to do is to move your old sourcecode aside and run utilities/rocketfuel-get to get it again with Python 2.6. A more complex but useful thing to do to manage sourcecode directories for multiple python versions is:

    cd ~/launchpad/lp-sourcedeps
    mkdir 2.6
    cd 2.6
    ln -s ../download-cache
    ln -s ../eggs
    mkdir sourcecode
    cd sourcecode
    for i in ../../sourcecode/*; do bzr checkout --lightweight "$i"; done

    and now point utilities/link-external-sourcecode to ../../lp-sourcedeps/2.6 - if you do that you'll need to be aware that rocketfuel-get won't know about it, and your extra directories will require occasional manual updating.

Cleanup potential

  • Is there any reason we need ipython-0.9.1-py2.5.egg in egg, not tarball, form?
    • Presumably we could bin the wadllib 0.1 eggs too.
  • Eventually we should get rid of all the scripts hardcoded /usr/bin/pythonX.Y and use buildout's shebang munging.

  • scripts/branch-rewrite.py uses /usr/bin/pythonX.Y -u. We should figure out if this is significant and why this script has to be different from other scripts.

  • scripts/ftpmaster-tools/_syncorigins.py uses /usr/bin/env pythonX.Y... why?!

  • cronscripts/mirror-prober.sh and cronscripts/nightly.sh are invoking python scripts with explicit interpreters. Why are they not using the shebangs? This leads to versions being defined in two places.

Known test failures and notes thereon

These results assume you:

  • Use the lp:~launchpad-committers/launchpad/python2.6 branch
  • Have a locally patched sourcecode/pygpgme:

    --- src/pygpgme-context.c       2008-10-16 07:44:55 +0000
    +++ src/pygpgme-context.c       2010-02-19 01:48:46 +0000
    @@ -92,6 +92,8 @@
             return -1;
         }
     
    +    gpgme_check_version(NULL);
    +
         if (pygpgme_check_error(gpgme_new(&self->ctx)))
             return -1;
     
  • Do not have python-tdb installed, which otherwise causes bzr-hg and bzr-git to behave in ways the tests do not expect.

  • Have the following not-yet-landed branches merged:
    • lp:~maxb/launchpad/trivial-bad-httpcaller-constructor-invocation
    • lp:~maxb/launchpad/py2.6-warnings-monkeypatching
    • lp:~maxb/launchpad/tolerate-lucid-apt-ftparchive
    • lp:~wgrant/launchpad/emailauthentication.txt-2.6-fix
    • lp:~wgrant/launchpad/do-not-shallow-copy-os.environ

BaseLayer: OK (281 tests)

MemcachedLayer: OK (8 tests)

LibrarianLayer: OK (9 tests)

DatabaseLayer: OK (46 tests)

LaunchpadLayer: OK (24 tests)

ZopelessLayer: OK (20 tests)

MailmanLayer: ??

  • Note: These do not run automatically. Use bin/test --layer=MailmanLayer

  • You may get failures when you run all the tests in one go. Try running each individually for more accurate results.

LaunchpadScriptLayer: OK (85 tests)

n=== LaunchpadZopelessLayer ===

  • test_bug_496988 (lp.bugs.scripts.tests.test_checkwatches.TestCheckwatchesWithSyncableGnomeProducts)

    Traceback (most recent call last):
    _StringException: Text attachment: traceback
    ------------
    Traceback (most recent call last):
      File "/home/maxb/launchpad/lp-sourcedeps/eggs/testtools-0.9.2-py2.6.egg/testtools/runtest.py", line 128, in _run_user
        return fn(*args)
      File "/home/maxb/launchpad/lp-sourcedeps/eggs/testtools-0.9.2-py2.6.egg/testtools/testcase.py", line 368, in _run_test_method
        testMethod()
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/scripts/tests/test_checkwatches.py", line 109, in test_bug_496988
        gnome_bugzilla, [bug_watch_1, bug_watch_2])
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/scripts/checkwatches/updater.py", line 522, in _getExternalBugTrackersAndWatches
        remote_bug_ids))
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/externalbugtracker/bugzilla.py", line 617, in getProductsForRemoteBugs
        self.initializeRemoteBugDB(bug_ids)
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/externalbugtracker/isolation.py", line 64, in wrapper
        return func(*args, **kwargs)
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/externalbugtracker/bugzilla.py", line 568, in initializeRemoteBugDB
        'permissive': True,
      File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
        return self.__send(self.__name, args)
      File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
        verbose=self.__verbose
      File "/home/maxb/launchpad/lp-branches/real-python-2.6/lib/lp/bugs/externalbugtracker/xmlrpc.py", line 98, in request
        response = self._parse_response(self.opener.open(request), None)
      File "/usr/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
        return u.close()
      File "/usr/lib/python2.6/xmlrpclib.py", line 838, in close
        raise Fault(**self._stack[0])
    Fault: <Fault Client: "Content-Type must be 'text/xml,' 'multipart/*,' or 'application/dime' instead of 'application/x-www-form-urlencoded'">
    ------------
  • lib/canonical/launchpad/ftests/../../../lp/bugs/tests/bugs-emailinterface.txt -- tests for http://bugs.python.org/issue7082, which has been fixed.

    • wgrant has a fix, but needs to check with Bugs. Will have to land in the 2.6 branch.

FunctionalLayer: OK (174 tests)

LaunchpadFunctionalLayer

  • valid_absolute_url (canonical.launchpad.validators.url) -- Python 2.6's urlparse disregards the uses_netloc list when parsing urls and treats anything beginning with // as netloc based. This makes maxb and wgrant say WTF!?! The untested valid_absolute_url DB constraint is also affected!

AppServerLayer: OK (143 tests)

DatabaseFunctionalLayer: OK (4467 tests)

GoogleLaunchpadFunctionalLayer: OK (72 tests)

PageTestLayer: OK (6335 tests)

TwistedLayer: OK (235 tests)

TwistedLaunchpadZopelessLayer: OK (16 tests)

TwistedAppServerLayer: OK (9 tests)

ZopelessAppServerLayer

  • test_hosted_branch_stacked_on_mirrored_branch (lp.codehosting.puller.tests.test_acceptance.TestBranchPuller): LayerIsolationError: Test left new live threads: [<Thread(Thread-3, started daemon 47618947405584)>]

    • This is because of the join() that salgado commented out in this branch, since it hangs. mwhudson has some ideas on resolving the hang.

ZopelessDatabaseLayer: OK (259 tests)

BugsWindmillLayer: OK (13 tests)

CodeWindmillLayer: OK (12 tests)

ForeignBranchPluginLayer: OK (61 tests)

SSHServerLayer: OK (46 tests)

RegistryWindmillLayer: OK (17 tests)

SoyuzWindmillLayer: OK (2 tests)

TestZopeTestInSubProcessLayer: OK (1 test)

TranslationsWindmillLayer: OK (7 tests)

UnitTests: OK

Shipit

Might be ok now, I've fixed the errors that were listed here, but I don't have access to shipit --maxb.