/srv/irclogs.ubuntu.com/2012/01/12/#ubuntu-app-devel.txt

=== timfreun1 is now known as timfreund
irc-freehi all09:12
irc-freedoes ubuntu allow apps that run on an emulator?09:12
jmljames_w: https://code.launchpad.net/~jml/pkgme-binary/backend-tests/+merge/88365 up for review13:13
jmljames_w: speeds up the test suite13:13
jmlajmitch: around?13:42
james_wjml, reviewed14:16
james_wjml, I'm adding a card to add a pdf test to the acceptance tests14:17
james_wjml, I also added one yesterday to set up CI14:22
jmljames_w: thanks.14:40
jmljames_w: was thinking of writing a little command-line twisted app that takes a pkgme-service url, a tarball and a metadata file, submits the tarball & metadata file to the pkgme-service, and terminates when it gets a response15:05
james_wjml, I think that would be very useful indeed15:05
jmljames_w: would be useful for testing our current production deployment works, and probably also for future issues.15:06
jmljames_w: ok, I'll do that then.15:06
james_wjml, I'm assuming we'll be able to hit the pkgme-service API url from the developer access machine to test production15:08
jmljames_w: or that a losa will15:16
james_wyeah15:17
james_wI wonder if it could form the basis of a much improved nagios check as well?15:17
jmljames_w: there's a thought.15:33
jmljames_w: I'm trying to submit a package to my local pkgme service and it's not finding the database17:39
jmljames_w: "no connection info available"17:39
james_wjml, dependency database?17:49
jmljames_w: yeah, that one18:04
james_wjml, do you have ~/.config/pkgme-binary?18:05
jmljames_w: I guess what I mean is, how do I say "use dev.cfg" (or is it actually looking for it?)18:05
jmljames_w: no.18:05
jmljames_w: how about I do that :)18:05
james_wjml, dev.cfg is used if production_credentials.cfg isn't there18:05
james_wso it should be using it already18:05
jmljames_w: hmm. so it should be looking for test.db, right?18:06
james_w~/.config/pkgme-binary/conf needs to point to a database containing valid dep db information18:06
james_wtwo different databases18:06
james_wtest.db holds all the pkgme-service tables, but doesn't have the pkgme-binary dependency tables18:07
jmlahh, of course.18:07
jmljames_w: there's something going on that I don't understand.18:17
jmljames_w: the script runs fine and prints out the request body from the server18:18
jmljames_w: but the celery daemon logs a 'Connection refused' during  submitter.request(metadata.callback_url, headers=headers, body=body) in submit_pkgme_info(metadata)18:19
jmljames_w: which I guess means it's trying to make a second connection.18:20
jmljames_w: the harness shuts down after the first successful one18:20
james_wjml, so it all works but it gets a refused connection calling the callback?18:21
jmljames_w: yes.18:21
james_wjml, that sounds plausible18:21
james_wcelery doesn't log that it's running the job twice?18:21
jmljames_w: well, celery doesn't log much18:22
jmlit prints out every traceback twice though18:22
jmlbut errors is all I get.18:23
* jml looks for a verbose option18:23
james_wjml, also, have you encountered $PIP_DOWNLOAD_CACHE yet?18:23
james_wit makes "fab bootstrap" a little bit less annoying18:24
jmljames_w: I have.18:24
james_wgood18:24
jmljames_w: but it's still pretty annoying :)18:24
james_wyes :-)18:24
james_wrunning it now to try out your new script18:24
jmljames_w: got debug logging working. no sign of two jobs.18:38
james_wjml, you made a tarball from acceptance test data?18:41
james_w(trying to run it myself)18:41
jmljames_w: yeah, I just used the gtk one18:41
james_wjml, is it easy to change the twisted server to shut down after two requests?18:42
jmljames_w: hmm. I guess so. I tried changing it to not shut down at all, but the second request never came.18:42
james_whmm18:43
james_wthat seems equivalent then18:44
james_wjml, have you confirmed it's getting one request?18:44
jmljames_w: how do you mean?18:44
james_wjml, the theory is that it's shutting down after the first request, but have you confirmed that it's getting a request and shutting down18:44
james_wrather than the port being wrong and so no requests are making it to the callback server?18:45
jmljames_w: it's definitely getting the callback request.18:45
james_wok18:45
jmljames_w: it prints the output from that to stdout18:45
james_wah yes18:47
james_w(I'm just seeing "timeout while waiting for response" so far)18:47
jmljames_w: check celeryd@test.log18:48
james_w(because I haven't set up ~/.config/pkgme-binary yet)18:48
jmlah.18:48
james_wok, I'm seeing the same thing now18:54
jmlcool.18:58
jmlexarkun suggested "You may also be shutting down the reactor such that the response is never sent, and some kind of retry logic in the client is kicking in."18:59
jmland when I put a delay between sending request & shutdown, everything works fine18:59
jmlannoyingly, there's no event to hook on for "response sent"18:59
james_wah19:00
james_wthat would do it19:00
jmlreactor.callLater(0, ...) to the rescue :(19:00
james_w0 meaning no timeout, which will run as the next thing after what it is doing, which happens to be sending the response?19:00
jmlyes19:01
jmlin the next event loop cycle, roughly19:01
james_wok19:02
james_wdo you know why it was working in the integration test?19:02
james_wI guess the reactor isn't shut down until the end of the test?19:03
jmljames_w: errors in the celery log don't necessarily fail the integration test.19:04
james_wah, true19:04
jmlI'd like to fix that.19:04
jmlBut I don't really know how. :)19:04
james_wyeah19:04
james_walso, the url in the response printed by the harness isn't a url, do we need to add another config option for that?19:05
james_wone for the dir to put the tarballs in, one for the url to get things in that dir?19:05
jmlyeah, probably19:06
jmlalso, I seem to have broken the test somewhere along the line19:06
jmlnope.19:10
jmlit's just that it behaves poorly with already-running celery19:10
jmljames_w: I'm late for things.19:10
james_wok19:10
jmljames_w: will catch up tomorrow. please merge this branch if you think it's ok.19:10
james_wjml, looks fine to me, if you are happy with it I will19:11
jmlI am.19:11
jmlg'night all19:11
=== JanC_ is now known as JanC
ajmitchjml: I'm around now, guessing that you're not? :)21:54

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