/srv/irclogs.ubuntu.com/2014/06/19/#ubuntu-autopilot.txt

thomiveebers: maybe, ask the question and I'll see if I can answer it :)00:01
veebersthomi: sure, was just typing it : -)00:01
veebersThe upstart/ubuntu app launch change I made (so it works in trusty) causes an issue where if the import fails the logger now has a handler that outputs to stdout, meaning we get a bunch of unwanted logging00:01
veebersso I currently have 2 solutions to this, but not sure which (if either) is best:00:01
veebershttp://pastebin.ubuntu.com/7666317/00:01
thomiveebers: why is there logging code in that try/except block at all?00:02
veebersthomi: I added that logging code00:03
thomiwhy'd you add it in the try/except block? I don't understand what logging code has to do with the import statements00:03
balloonsveebers, btw on the logging stuff.. I've spent all day with the music devs.. we got it quasi working00:04
veebersthomi: because when I step through the code before the "from gi.repository import UbuntuAppLaunch" the rootLogger has 0 handlers, after that import fails it has 100:04
balloonsit required us calling the processes using subprocess copying the env, and copying it to upstart as well00:04
veebersballoons: logging? Or this is using HOME right?00:05
balloonssorry veebers not logging, but mocking :-)00:05
thomiveebers: ahh ok, so UbuntuAppLaunch (or whatever it's called) adds a logging handler at import time.00:05
thomiveebers: you shouldn't be removing it's logging handler at all, that's bad00:05
veebersballoons: right :-) hmm, so your launching the application with launch_test_application00:06
thomiveebers: instead, tweak the logging config so only 'autopilot.*' logs are produced, and everything else is unconfigured00:06
veebersthomi: right, when it fails it adds a handler, the problem is then the rootLogger has a handler tha outputs all the INFO etc. messages00:06
thomithe default should be to go to /dev/null00:06
veebersthomi: ah right, thata's a much better solution00:06
thomiveebers: only because we configured it that way00:06
thomiand technically it shouldn't be the root logger00:06
balloonsveebers, yes but music at least uses a service which also has to be extensively lied to.. faked db, faked secondary service, upstart fakery, etc00:07
balloonsit got insane.. but it does work on the desktop now.. the device still doesn't work00:07
veebersballoons: ah ok I see. Is there anything we can do within autopilot to ease that? (assuming this isn't a once off for one app etc.)00:08
balloonsi've no idea on calendar which doesn't have all that, and thus should be more straightforward.. but I guess I can't blame you ;-)00:08
veebersheh :-) That's what I like to hear00:08
balloonsveebers, there might be some things we could look at, but my brain is way fried to think about it now00:08
thomiveebers: yes - just configure logging for 'autopilot.*' loggers, not for all loggers.00:08
veebersthomi: sweet, cheers I'll give that a whirl00:09
veebersthomi: I may misunderstand this logging. UbuntuAppLaunch adds a handler to the root logger (i.e. logging.getLogger() ) so even if i use logging.getLogger("autopilot") it will 'inherit' that handler from root, right?00:26
thomiveebers: are you sure that's what it's doing? It should be logging to a non-root logger (like 'ubuntuapplaunch')00:26
thomiif so, then it's broken, and the proper fix should be submitted upstream00:26
veebersthomi: I'm pretty sure it is, the log message "ERROR:root:Could not find any typelib for UbuntuAppLaunch" has :root: in it00:27
veeberswill dig further00:27
thomiveebers: you'll probably want to look at the upstream source00:27
veebersthomi: ack cheers. That probably means that autopilot logging should change too right? (something like changing logging.getLogger() -> logging.getLogger("autopilot") )00:28
thomiveebers: logging.getLogger() doesn't get the root logger00:29
thomiveebers: I'm like 90% sure it reads __name__ in the callers frame00:29
thomito figure out which loger you want00:29
thomior do we explicitly pass in __name__ most of the time? I can't remember00:30
veebersthomi: from the docs for getLogger() If no name is specified, return the root logger.00:30
thomiok00:30
thomibut we pass in __name__ most places in AP, right?00:30
thomicos I *know* we don't log to the root logger in AP00:30
veebersthomi: we generally do "_logger = logging.getLogger(__name__)" but in run.py we use getLogger() (within the method def get_root_logger(): )00:30
thomiTBH, it might make sense for AP to configure the root logger anyway00:31
thomisince it's the application00:31
thomiso that's probably still correct00:31
veebers we add handlers to the logging root00:31
veebersyeah I see00:31
Noskcaj-schoolFYI: In the xubuntu tests, __init__.py is a folder rather than a file.00:34
Noskcaj-schoolI can fix this when i get home if noone does before then00:34
elopioping thomi: I need packaging help.03:00
thomielopio: yo03:00
thomiwassup?03:00
thomielopio: Also, I thought you were on holiday?03:00
elopiothomi: I'm on holiday on friday.03:00
thomiahhh03:00
elopiothomi: I'm trying to package ubuntu_experience_tests through immitation, and failing miserably so far.03:01
thomiheh, ok03:01
thomias luck would have it, I've just spent the morning packaging two python modules, so I'm "in the zone" :)03:01
thomihave you got a branch I can look at?03:01
elopioI'm lucky :) I'm pushing.03:02
elopiothomi: https://code.launchpad.net/~elopio/ubuntu-autopilot-tests/skip_dialer/03:02
* thomi branches03:03
thomielopio: OK, first off, you need a setup.py file03:04
* thomi creates one quickly03:04
elopiothomi: oh, I have one.03:05
elopioI forgot to add it.03:05
thomi:)03:05
thomilet me know when I can re-pull :)03:05
elopiothomi: done03:06
thomielopio: these are for python 3 only, right?03:11
elopiothomi: yes. I'm commenting out the py2 dep while it gets ported.03:11
thomiok03:11
thomihmmm, for some reason the build step is being ignored03:16
thomiahaaaa03:18
thomielopio: got it going03:21
* elopio waits for the master to explain...03:22
thomipushing now03:27
thomielopio: lp:~thomir/ubuntu-autopilot-tests/skip_dialer/ works for me with 'dpkg-buildpackage' - I haven't tested 'bzr bd' but I see no reason why it shouldn't work too03:27
elopiothomi: nice, so this doesn't use dh_python3, it uses pybuild right?03:29
thomielopio: yup: rule of thumb: if something's not working, try using pybuild :)03:29
elopiothank you very much thomi.03:33
elopiodo you want to leave your approval here? https://code.launchpad.net/~elopio/ubuntu-autopilot-tests/skip_dialer/+merge/22367103:33
thomielopio: no worries!03:33
thomisure03:33
thomielopio: although you probably want to get someone who knows what they're doing approve it as well03:34
elopiothomi: Right. I'll ask brendan or balloons tomorrow.03:34
thomielopio: approved, with a small tweak you should make03:35
elopiothomi: sorry, what diff comment are you talking about?03:36
thomielopio: in the MP you just linked tome03:36
thomi*to me03:36
thomiI reviewed it, and made a diff comment03:37
elopioyeah, I don't get what you are talking about.03:38
elopioit might be because I should have EOD a couple of hours ago :)03:39
elopiooh03:39
elopioI see it, diff comments, this is the first one somebody leaves me :)03:39
elopiothomi: one more thing, why did you commented the #Vcs-bzr line ?03:40
thomihmmm, I dunno - perhaps re-add that bit :)03:40
elopiook, thanks.03:41
elopiotomorrow I'll ask ci to start running this suite.03:41
* elopio dreams about the future.03:41
elopiobarry: any chace you are still around?04:02
thomimorning19:03
thomielopio: ping?19:11
elopiothomi: pong21:00
thomielopio: kgunn & dednick were asking about whether there was an AP test that switched between applications21:01
thomii.e.- one that says "now load the XXX application"21:01
thomirather than randomly21:01
thomiI wonder if you could follow up with kgunn and dednick about that?21:01
elopiosure. Where?21:01
thomielopio: he asked me in #mir21:02
thomion canonical irc21:02
elopiothomi: ok.21:02
thomibarry: hey - got a second?21:15
barrythomi: i'm on hold, so yes :)21:32
thomibarry: was wondering if you saw my notes on the BP whiteboard, and if you had, wanted to say that I'm happy to take them through the mentors.debian.org process, but that since they depend on the new pyramid packaging, we'd need to wait for that to complete first21:33
thomibarry: also, are you able to approve a package I have in the debian new/byhand queue? It's been there for several weeks now, and I'm getting impatient :)21:34
barrythomi: i've got lots of the packages already in flight; taking a look at pyramid now, which requires a bit more hacking than nuclearbob's branch.  haven't looked at gunicorn or the debug packages21:38
barrythomi: which packages in particular did you want to take through mentors?21:38
barryum, no i am not an ftpmaster so i can't approve anything out of new ;)21:39
barrythomi: as soon as python-nose-exclude clears new i can upload venusian21:39
thomipyramid-mako and pyramid-debugtoolbar. It wasn't so much that I *wanted* to take them through mentors, just that I was willing to, if it made your life easier :)21:39
thomibarry: any idea how long it takes on average for something to get approved out of new?21:40
barrythomi: ah.  since those are "nice to have but not blockers" i think i'm happy for you to do them :)  i've got other work backing up21:40
thomiI see packages in that queue that have been there for over a year21:40
thomibarry: ack21:40
barrythomi: *usually* it's only a few days, but might be as much as a week or so.  i know some people i can poke if it goes too long, but i don't want to wear out my welcome so to speak ;)  i don't expect our packages to take too long21:41
thomiwell, my sphinxcontrib-youtube has been there for 3 weeks now :(21:41
thomiI'm not in a rush since it's in ubuntu already, but it's annoying me is all21:42
barrydang21:43
barrythomi: https://wiki.debian.org/NewQueue21:43
barrymaybe some of those links will help getting it poked21:44
thomibarry: thanks21:45
thomibarry: heh, first words in the channel topic for #debian-ftp is "don't expect any service"21:55
thomiwhich kind of sums up my experiences with debian in a nutshell21:56
barryy'gotta love it22:03

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!