← Back to team overview

launchpad-dev team mailing list archive

Re: combo loader update

 

On Fri, 20 Jan 2012, Ian Booth wrote:

> 1 step forward 2 steps back today
> 
> I can't land it yet because without upgrades to buildbot, it will fail.
> Steve has done the ground work and the next step is to ask webops to
> copy convoy and the new lp deps into cat and upgrade buildbot(s). The
> updated launchpad-dependencies package is already live so next time
> people apt update, they will get the stuff they need locally so stuff
> builds when the branch does land. To run, they still need to manually
> update the apache configs.
> 
> So we thought that I'd ec2 test the branch so at least we would know
> it'd go through ok when ec2 land becomes viable. Sadly, a bunch of
> doctests fail, because there's a warning printed to stderr when
> Launchpad's bin/py runs, and so of course doctests which compare the
> output with expected text will fail. See output below. Warning is
> 'import site' failed; use -v for traceback
> 
> Fucked if I know what's going on. When I run locally, I get a different
> error. Remember, this all comes from bin/py, so I can't see how it's
> related to any combo loader changes. My error is:
> 
> 'import sitecustomize' failed; use -v for traceback
> 
> I ran with -v and got: https://pastebin.canonical.com/58488/
> 
> The issue may be obvious but at the moment I cannot see what it is.
> Perhaps related to the recent required packages that were installed with
> the new lp deps? I may come back to it tomorrow and it will be right
> there staring at me but foe now, if any of you can give me a clue, that
> would be great.

Well I'm going to vote not obvious. I've tried to trace this out and this
is what I can see so far:

Here's a cleaned up test failure with just one test to look at:
http://paste.mitechie.com/show/508/

>From what I can see is that the test verifies our custom log levels of
debug2-9 so we can do log.debug3(xxx).

These levels are added in the file: lp_sitecustomize.py

Now this gets pulled in from a parts directory. In the case of this test,
we're hitting parts/buildout/scripts/sitecustomize.py. That's
called/imported from a method in parts/buildout/scripts/site.py
(execsitecustomize).

And the site.py is pulled in from the bin/test script.

> import sys
> sys.path.insert(0, _z3c_recipe_filetemplate_path_repr('parts/scripts'))
> import site

Now in debugging, this succeeds. The right path is generated, added to
sys.path, and the import site here succeeds.

So if you check the failed test, it all starts out failing with the error
that it can't import site. So somewhere else during the test run attempts
to import site but fails. If you can't import site, than the sitecustomize
doesn't get loaded and if that doesn't get loaded you don't get the custom
log levels defined.

Now all of this passes on devel so I've tried to see what exactly is
different. The only thing that seems to touch any of this is that the
.installed.cfg is different. At the bottom of the one I have in devel I've
got a lot of

> [buildout]
> installed_develop_eggs =
> /home/rharding/launchpad/lp-branches/devel/develop-eggs/lp.egg-link
>
> [buildout]
> parts = scripts filetemplates tags iharness i18n txlongpoll yui
>
> [buildout]
> parts = filetemplates tags iharness i18n txlongpoll yui scripts

>
> [buildout]
> parts = tags iharness i18n txlongpoll yui scripts filetemplates
>
> [buildout]
> parts = iharness i18n txlongpoll yui scripts filetemplates tags
>
> [buildout]
> parts = i18n txlongpoll yui scripts filetemplates tags iharness
>
> [buildout]
> parts = txlongpoll yui scripts filetemplates tags iharness i18n
> 
> [buildout]
> parts = yui scripts filetemplates tags iharness i18n txlongpoll

Which doesn't exist in the use-convoy branch. I'm not sure where this comes
from and if it's important, but it's the closest thing I can find using a
diff between the two branches.

I'll keep poking, but wanted to put this down in writing before I lose
track of the chasing so far.

--

Rick Harding

Launchpad Developer
https://launchpad.net/~rharding
@mitechie



Follow ups