/srv/irclogs.ubuntu.com/2015/03/17/#ubuntu-quality.txt

veebersballoons: fyi for your bug you filed, I've filed this against python3-xlib: https://bugs.launchpad.net/ubuntu/+source/python-xlib/+bug/143288900:04
ubot5Ubuntu bug 1432889 in python-xlib (Ubuntu) "Creating Display() fails with "Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'No protocol specified\n"" [Undecided,New]00:04
veebersubuntu-qa: anyone know who to talk to re: looking at tha above bug? ^^00:05
ToyKeeperHmm, weird.  Has been ages since I used pyxlib.00:11
ToyKeeperI think the last time was when I wrote something to type in my 2fa codes for me.00:12
elopioping veebers. I need to go to the gym, and bbl.01:05
elopiobut I made a quick hack to get started.01:06
elopiohttps://code.launchpad.net/~canonical-platform-qa/ubuntu-ota-tests/break_testbed/+merge/25313701:06
elopioI think that changing the revert command is not the right way to do it, but so far I haven't found a different way to do it.01:07
veeberselopio: ack, I'll take a look in a little bit. Enjoy the gym, feel the burn :-)01:09
veeberselopio: you're not back are you?04:18
elopioveebers: I am.04:18
veeberselopio: nice, so I'm looking at your link for break_testbed. Trying to try some things out. Is there a way to nicely get adt-run to use the version of adb-reboot-to-recovery script?04:20
veebersi.e. I'm getting 'don't have the revert-full-system' capability etc. Just want to tinker a little bit04:20
elopioveebers: /home/elopio/workspace/canonical/autopkgtest/run-from-checkout -d -s -B --unbuilt-tree=. --output-dir /tmp/output --- ssh -s ./adb-reboot-to-recovery04:20
veeberselopio: ah of course04:20
veebersthe -s arg just melded into the background for me :-)04:21
elopiothat's what I'm using. You probably won't need the run-from-checkout, that's to use the unreleased adt-run version.04:21
veebersack04:21
veeberselopio: thanks04:21
elopioveebers: np. I'm starting to give it a try here.04:21
veeberselopio: coolio, I wanted to try a couple of things out to get an understanding of the code and how adt-run works before making suggestions04:22
elopioveebers: that would be awesome. Without martin, I'm getting lost on the code.04:24
elopioveebers: is there something I can do in my morning tomorrow about the autopilot failures?04:25
veeberselopio: I'm about to fire off an email to the team, but I err we need to find out who to ping re: the bug that I filed.04:26
veeberselopio: this bug here: python3-xlib: https://bugs.launchpad.net/ubuntu/+source/python-xlib/+bug/143288904:26
ubot5Ubuntu bug 1432889 in python-xlib (Ubuntu) "Creating Display() fails with "Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'No protocol specified\n"" [Undecided,New]04:26
elopioveebers: I see the last people to touch that package were pitti and mdeslauries04:26
veeberselopio: right, I saw pitti but didn't dig deeper yet04:26
veeberselopio: re: the adt-run code it can be very easy to get lost in.04:26
veeberselopio: re: bug is this the same person? https://launchpad.net/~mdeslaur04:30
elopioveebers: yes, him.04:31
elopioI can ping him tomorrow morning to see if he has a clue of who can help us with that.04:31
elopioI read the python-xlib code and also got lost.04:31
veeberselopio: awesome thank you. I probably should have tried earlier this morning04:31
elopioveebers: you did a good bunch of things. I only retried the jenkins run :)04:32
veeberselopio: heh, I set a break point followed it down until it errored, did that a couple of times to pinpoint it04:32
veebersthen I realise it's setting up a request to the x server and then it's not obvious from that point :-P Hence the bug04:32
elopioveebers: I've just pushed a new rev to my break_testbed branch, with a wait_booted that it wwas missing.04:32
veebersI don't know if the fix will be in that package as it doesn't look like python3-xlib has changed, more than likely something underneath it04:33
veeberselopio: ah cool, I'm not to sure if I triggered it properly. How do you get the stdout of the ssh script to come to screen? I only see the output of adt-run04:33
elopioveebers: I'm not sure what you are looking for. I'm running with:04:35
elopio/home/elopio/workspace/canonical/autopkgtest/run-from-checkout -d -s -B --unbuilt-tree=. --output-dir /tmp/output --- ssh -s ./adb-reboot-to-recovery04:35
elopioand I get a whole lot of stuff.04:35
elopioif you put a print in the adb-reboot-to-recovery, I think it should be printed.04:35
veebersdo you get details from adb-reboot-to-recovery? I'll try again, but I see heaps of output, none from that script04:36
elopioI see things like this:04:36
elopioadt-run: DBG: sending command to testbed: revert04:36
elopioPerforming factory reset, this will take a minute...04:36
elopioI think it's being executed also after the selftests, which is wrong.04:37
veebershmm04:37
veeberselopio: Oh I have family dinner in a bit. If I don't get around to mentioning it I think that what you have suggested is fine for a first run (It might be all we can do) but I don't think we can rely on --revision=-1 as we may have changed how many revisions we're at04:38
veebersso I perhaps an envvar set by the wrapper script to inform what revision the device was flashed at initially04:39
elopioveebers: right, this was just a quick hack.04:39
elopioit sounded hard to get the current version from the phone and pass it to the adb script, so I just didn't do it this evening :)04:40
veebers^_^04:43
veeberselopio: if you wanted to query the device for the revision you would have to do it before any test was run as it would change to anything from that point onwards04:44
veebersalso, current revno: adb shell system-image-cli -i | grep "current build number"| sed -e "s/.*:\ //" | tr -d '\r'04:46
elopioveebers: yes. And we can write that info to a file, like we do with the reboot target.04:49
elopioveebers: we'll also need the channel.04:50
elopioI think that's the downside to this approach. With your branch, we just need to reexecute the command that flased the phone initially.04:52
elopioI'm reading something interesting on the source code. If we pass a setup command, it is reexecuted before the revert.04:53
veeberstrue. Well, at least we have 2 possible work-arounds at this stage :-)04:53
elopioor that's what it seems.04:53
veebersoh?04:53
veebersheh04:53
elopioso if the setup command is ubuntu-device-flash, it might do what we want.04:54
elopioI'll give that a try tomorrow.04:54
veeberselopio: if that works that'll be really cool. We'll need a way to setup the setup command properly with, as you say, rev and channel04:55
elopioveebers: no, scratch that. The setup commands are run in the testbed.04:58
veebersah, ugh. Worth a try though04:59
veeberselopio: right, I'm off for the night, have a good one :-)05:13
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== txspud is now known as txspud|ORS
=== chihchun is now known as chihchun_afk
nuclearbobelopio: where do I need the -B? the python3 -m command line, or adt-run, or somewhere else?13:41
nuclearbobubuntu-qa: elopio suggested my build failure meant I need to add -B, but I'm not sure where. adt-run? python3 -m ubuntu_sanity_tests.command_line?13:51
rhuddienuclearbob, I believe that would be to adt-run, e.g. adt-run -B --unbuilt-tree=. --- ssh -s adb13:52
nuclearbobrhuddie: thanks, I'll try that14:00
elopiogood morning.14:15
nuclearbobubuntu-qa: I want to run a test that involves rebooting a phone, performing some actions, disconnecting the phone, waiting a while, reconnecting, then doing the whole process again. Is there a way to express all of this as an adt test, or do I need to just use adt for the actions on the phone and use a wrapper for everything else?14:24
=== chihchun_afk is now known as chihchun
rhuddienuclearbob, adt-run tests run on the testbed, but it has --setup-commands option which may be useful to you14:34
rhuddienuclearbob, you could also look at our sanity suite which is launched through a call to python, which does setup and cleanup actions, then calls adt-run itself: https://bazaar.launchpad.net/~canonical-platform-qa/ubuntu-sanity-tests/trunk/view/head:/ubuntu_sanity_tests/command_line.py14:36
rhuddienuclearbob, also, the reboot support for adt-run is at the bottom of this page: http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/tree/doc/README.package-tests.rst14:38
nuclearbobrhuddie: awesome, thanks. I was looking for a test in the sanity suite which includes a reboot, but my grep-fu is failing. Do you know of one I can look at?14:50
rhuddienuclearbob, there aren't any in sanity that reboot, but ubuntu-ota-tests is using it. see http://bazaar.launchpad.net/~canonical-platform-qa/ubuntu-ota-tests/trunk/view/head:/debian/tests/ubuntu_ota_tests/hooks.py14:56
nuclearbobrhuddie: great, I'll look at that. Thanks!14:56
nuclearbobrhuddie: I think since I'm rebooting as part of actions that are external to adt, I don't need to use the adt reboot logic, and I can handle that in my python wrapping stuff. If you or someone else on ubuntu-qa disagrees, we can discuss it further, but I think this is all I need to implement what I'm working on. Thanks!15:01
rhuddienuclearbob, no prob, sounds sensible to me15:02
elopiorhuddie: It's not clear if your last comment on apply-update was an approval.15:04
rhuddieelopio, there was one other comment about adding the timeout parameter for apply_update() method15:12
rhuddiefgimenez, what do you think about adding the timeout parameter to apply_update() ?15:12
fgimenezrhuddie, i'm not sure if we need it, if it's a noop it will be very fast, if it has to actually apply the upgrade, how much should the timeout be?15:14
rhuddiefgimenez, the default is 600 seconds, but I see it can be over-ridden using $SYSTEMIMAGE_REACTOR_TIMEOUT. This would just be another way to specify a custom timeout.15:18
rhuddiefgimenez, I did something similar with the download test here: http://bazaar.launchpad.net/~canonical-platform-qa/ubuntu-ota-tests/wait-for-download/view/head:/debian/tests/ubuntu_ota_tests/services.py#L16415:21
rhuddiefgimenez, but I agree for this case it should complete quickly so not a big issue15:22
fgimenezrhuddie, anyway it doesn't hurt to have one, is 60 seconds enough as the timeout value for applying the update?15:24
rhuddiefgimenez, I would say that is fairly short for an update, perhaps 3 mins? At least by having it as a parameter to apply_update() it can be easily specified by the caller.15:26
fgimenezrhuddie, ok, done15:30
rhuddiefgimenez, thanks :)15:30
fgimenezrhuddie, ty! :)15:31
elopiofgimenez: I'm having a problem with the noop test: http://paste.ubuntu.com/10615956/15:50
elopiorunning on the phone.15:50
fgimenezelopio, you have the latest source right?15:51
fgimenezi'm getting http://paste.ubuntu.com/10615969/ ...15:54
fgimenezelopio, that timeout exception may be raised because of the latest changes, does it take too long (~3min) when executing test_apply_update_noop?15:56
rhuddiefgimenez, that was the issue I had when running that test previously. It was timing out, but previously it was a 10 min timeout.16:26
elopiofgimenez: yes, it takes 3 minutes before failing.16:27
elopioI have an old revision, so can it be that the cancel is not working?16:27
fgimenezelopio maybe, i haven't been able to see it after reflashing, perhaps some of the status is being kept16:28
elopiofgimenez: can you try with an old version?16:29
fgimenezelopio, of the code you mean?16:30
fgimenezelopio, the only change in the code has been adding the timeout as a parameter, rhuddie was getting the error after the default timeout before this change16:32
fgimenezelopio, if you reflash all goes good, it seems that somehow the testbed reaches a state in which ApplyUpdate times out...16:34
elopiofgimenez: sorry, In a meeting.17:00
elopioit passed now: test_apply_update_noop (ubuntu_ota_tests.selftests.test_services.ServicesTestCase) ... ok17:00
fgimenezelopio, np, i'm trying to run it with an update already downloaded17:01
fgimenezelopio, in that case the update is applied, the selftest crashes with BrokenPipeError because of the reboot, but no timeout17:03
fgimenezelopio, another scenario could be calling ApplyUpdate while downloading, but CancelUpdate should do its work in that case17:05
=== chihchun is now known as chihchun_afk
elopiobarry: I'm almost sure I'm doing something stupid in here: https://code.launchpad.net/~canonical-platform-qa/ubuntu-ota-tests/dbus-upgrade/+merge/25326519:24
elopiocan you please take a look?19:24
barryelopio: do you still want me to look at your dbus-upgrade branch?20:06
Letozaf_balloons, hi20:33
balloonsLetozaf_, hello20:34
Letozaf_balloons, have you got 2 min to take a look at a bug report on rssreader app, just to see if you have idea what the problem could be?20:35
balloonsLetozaf_, link?20:36
Letozaf_balloons, https://bugs.launchpad.net/ubuntu-rssreader-app/+bug/143136520:36
ubot5Ubuntu bug 1431365 in Ubuntu RSS Feed Reader App "Tests fail at warning dialog "A topic with that name already exists"" [High,New]20:36
Letozaf_balloons, maybe just a hint :)20:37
balloonsLetozaf_, ohh.. it's creating a topic in a non-clean env20:37
balloonsI think the workaround popey suggested is sufficent. Generate a unique random topic name (based on datetime; uuid, something) and you can avoid it20:38
balloonsThough you will build up topics ;-)20:38
balloonsso fixing the test should be as simple as making the topic non-hardcoded20:39
Letozaf_balloons, ok thanks I will try, but the weired thing is that on my desktop the tests do not fail and also on Jenkins20:40
Letozaf_balloons, shouldn't they fail also there ?20:40
Letozaf_balloons, https://code.launchpad.net/~carla-sella/ubuntu-rssreader-app/just_for_test/+merge/25312220:41
balloonsLetozaf_, not neccassarily20:41
Letozaf_balloons, ok20:41
Letozaf_balloons, thanks :)20:42
barryveebers: you wanted to pair on refactoring the code into a native debian package?  when is a good time for you?20:42
balloonsLetozaf_, :-) It should still pass after you finish your mp, heh, but should work in CI then too :-)20:43
Letozaf_:)20:44
veebersbarry: When suits you? I can go make a coffee now and be free for an hour or two20:47
barryveebers: sure, let's connect on the hour.  i have 1h until eod, but i think i can go longer today if needed20:48
veebersbarry: sounds good20:49
veeberselopio: hey thanks for chasing up on that bug, much appreciated21:00
elopiobarry: veebers: I think that we need the package to execute the reboot to recovery with dbus.21:01
elopiothat might be the problem of my branch, ubuntu_ota_tests is not on the python path so systemimage can't find the hook.21:01
elopioplease push the branch when you have something working, so I can give it a try.21:01
elopioveebers: all your gratitude should go to mdeslaur. It took only a couple of minutes of my life, he did the rest.21:02
veeberselopio: ack, will thank him for the fix21:02
veeberselopio: I don't understand your comment re: reboot with dbus, what's this in relation to?21:03
elopioveebers: look at l104 of the diff:21:04
elopiohttps://code.launchpad.net/~canonical-platform-qa/ubuntu-ota-tests/dbus-upgrade/+merge/25326521:04
barryelopio: that makes sense21:05
elopiofor systemimage to find ubuntu_ota_tests, it must be in the pythonpath.21:05
elopiobarry: however, I'm not sure if that's the only problem. This is what I'm seeing:21:06
elopiohttp://paste.ubuntu.com/10617492/21:06
barryand the best way for it to be on sys.path is to be installed as a python3 package :)21:06
elopioand the test times out after three minutes.21:06
barryelopio: i was just testing your branch on my device and i also see the timeouts21:06
veeberselopio: ah, that's clearer21:07
elopioanyway, I need to have lunch and take a break.21:08
barrycool.  veebers, i'm ready when you are21:08
elopioif I'm lucky, you will have the package ready and that will magically fix the update :)21:08
veebersbarry: sweet, should we hangout?21:12
barryveebers: sure21:12
veebersbarry: lets reuse the standup21:12
veebersbarry: one sec mic issues21:13
barryveebers: https://wiki.debian.org/Python/LibraryStyleGuide21:14
barryveebers: lp:~barry/ubuntu-ota-tests/packaging21:19
veeberswth, all of a sudden cats make a huge ruckus running about etc. I go through to the lounge and they're just sitting there on the couch like nothing has happened :-\21:40
barryveebers: we have to rename the debian/tests scripts.  see r1321:41
veebersack21:41
barryveebers: r14 is lintian source and binary happy21:43
veebersbarry: nice. So the @ doesn't seem to be needed unless I'm missing something. I can update the selftest so that it will work (was making assumptions on location) and it runs21:55
barryveebers: nice21:55
veebersbarry: actually if I do put the @ there it errors, can't find python3-ubuntu-ota-tests:armhf21:57
barryveebers: did adt-run build the package?21:58
barryit'll have to build it and install it on the device i think21:58
veebersyeah right, no it states that build not needed. Perhaps I'm passing the wrong args to adt-run21:59
veebersah I think  I am, one sec21:59
veebersbarry: so I'm a little confused. So it appears to work without @ as I'm presume it copies the directory across. Using @ (and not using -B arg) it attempts to build the binaries, but fails when it 404s trying to satisfy deps for building.22:03
veebersso, do we need @ or are we ok with just whatever it's doing without it22:03
barryveebers: gosh, i'm not sure.  can you push your branch so i can try it here?22:04
veebersbarry: heh, well my branch consists of removing a bunch of stuff so that only one test will run, I'll push it anyway :-)22:05
veebersbarry: branch here: lp:~veebers/+junk/running-adt-ota22:07
* barry tries22:07
barryveebers: what adt command are you using?22:08
veebersbarry: ah sorry distracted, one mo22:08
veebersbarry: this one triggers the build attempt: 'adt-run --unbuilt-tree=. --- ssh -s adb' adding -B doesn't: 'adt-run -B --unbuilt-tree=. --- ssh -s adb'22:09
barryveebers: cool, trying it22:10
barryveebers: so, with @ and no -B, i get ImportError complatining about ubuntu_ota_tests.selftests.  is that what you get?22:15
barry*complaining22:15
veebersbarry: no with @ and no -B I get.. wait, let me dbl check22:17
=== chihchun_afk is now known as chihchun
veebersbarry: It attempts to build then fails because apt is out of date. It might get further if I r/w and apt-update but I'm not sure we want to rely on that22:19
barryi thought maybe adding an explicit Depends on system-image-common would do the trick but it doesn't22:19
barryveebers: weird!22:19
veebersbarry: I think this flash is a couple of days old so archive has moved on (I suspect)22:20
* barry wishes unittest test's discovery wouldn't swallow the actual import error22:20
veebersso hmm, perhaps it won't be such an issue if we're expecting people to flash just before use. Although we can see that error straight after a flash too22:20
veebersbarry: so after an apt update I get further but it's building the package on the device itself, which is installing a bunch of stuff and taking a while. If we're going to use the wrapper script to call this once per test this will take all day22:27
barryveebers: i think adt has a way of using already built binary packages, which would be fine in this case because we're arch-independent.  so you could build the debs once on the host and then just let adt copy those to the device22:28
veebersbarry: that would be good. Any idea on how to get it to build on the host? I would have thought arch: any would be the key22:30
barryveebers: i don't think you get adt to build on the host.  just build the binary package on the host like normal and then tell adt to use the built packages.  the former is just `bzr bd -S && sbuild blah.dsc` but i forget the syntax for the latter22:31
barryveebers: it's dinner time here.  i'm going to take a break, but will try to check back a little later.  or we can rendezvous again tomorrow22:33
veebersbarry: sounds good. Enjoy. I'll try start a little earlier so we can have more overlap time if needed. But don't feel you need to wait for me :-)22:34
veebersbarry: thanks for the pairing22:34
barryveebers: sounds good!  cheers22:34
brendandelopio, is there a reason you defined __all__ in ubuntu_ota_tests/__init__.py?22:59
brendandelopio, unless there's a reason there's not really any need to, it just causes all modules to be loaded when you import the top level one, which is a pain23:00
veebersbrendand: I think it was me that did that due to believing it was best practice23:03
veebersthe idea being that the package only exporting what wee define as public. It shouldn't be too much of an issue as the modules shouldn't really do anything when loaded23:05
brendandveebers, ok - for some reason i thought elopio. bzr blame would have been worth it :)23:05
veebersBut I'm not against removing the __all__ there if it is causing grief23:05
brendandveebers, well all the imports will run as a minimum23:05
veebersheh, I almost let Leo take the blame for it :-)23:06
brendandveebers, it means you need to have e.g. python3-autopilot as a dependency even if your code doesn't use it23:06
veebersyeah right, but they shouldn't be running much or any code, just definitions23:06
veebersbrendand: hmm, that's a really good point23:06
brendandveebers, so unless defining __all__ enables something, i would like to remove it23:06
veebersbrendand: go nuts, I can't think of anything off the top of my head that means we need it. if we do need it we can put it back, but better23:07
veebersalso, as you've shown it can be a pain23:07

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