/srv/irclogs.ubuntu.com/2011/09/02/#ubuntu-ensemble.txt

jimbakerniemeyer, any preferences in terms of python tools for writing html? cheetah?00:06
niemeyerjimbaker: I would prefer something very simple00:09
jimbakerniemeyer, exactly. so please tell me what you prefer, and i will use it :)00:09
niemeyerjimbaker: If possible a single Python file we can embed in the project itself00:09
niemeyerjimbaker: Since our needs are pretty trivial.. just iterating over a list building a table with OK/FAILED + links00:10
niemeyerjimbaker: Do you know anything like that?00:11
niemeyerI'll get some food, biab00:12
jimbakerniemeyer, i don't know of an ultra simplistic tool. typically when it's framed like that, it tends to be done with just direct writes00:12
SpamapSOK/FAILED links? isn't that what jenkins does?00:16
jimbakerniemeyer, but in my experience that rarely works well. best to use a tool chain that ensures compliant output. i haven't used cheetah, but i know it's used by other people on the ubuntu server team00:16
jimbakerSpamapS, correct, we are re-implementing what jenkins does00:16
jimbakerSpamapS, regardless this is the task i have00:16
SpamapSeh?00:16
jimbakerfor our functional testing00:17
SpamapSRight, subunit doesn't have something ?00:19
SpamapSI mean, jenkins is like, the industry standard.00:19
SpamapSAnd we have a.. really kick ass jenkins formula. :)00:19
jimbakerSpamapS, agreed that jenkins is the industry standard00:19
SpamapShttps://wiki.jenkins-ci.org/display/JENKINS/NUnit+Plugin00:20
SpamapSI was kind of hoping we'd get to a point where we were graphing all that lovely test coverage00:20
jimbakerSpamapS, yes, output to standard nunitxml is pretty trivial. subunit supports this, through subunit2junitxml. however, the functional testing will not be done w/ trial00:21
SpamapSaww snap00:22
jimbakerSpamapS, this is actually a good thing. trial is pretty wretched for long running functional tests00:22
jimbakerSpamapS, niemeyer has written a new test runner that will execute shell scripts (this is the churn we discussed earlier on this channel)00:22
SpamapSAwright. Well, I don't really see us matching jenkins for frontend capabilities.. probably worth your time to produce nunint/junit xml and then just chug through it on jenkins.00:23
jimbakerSpamapS, however, it might make sense to output junitxml instead. perhaps that could be considered at a later time.00:23
SpamapSA new test runner that runs shell scripts?00:23
SpamapSThats also what jenkins does. :)00:23
SpamapSTho its not much of a tool for developers to run in an iterative sense..00:24
SpamapSI didn't think the functional tests would be somethign you'd do in that manner.00:24
SpamapSFigured you'd just set jenkins jobs up to point at in progress branches and trunk and run tests on commit00:24
jimbakerSpamapS, that makes a lot of sense to do. again the test runner could readily output junitxml00:25
jimbakerSpamapS, the more important thing is that we want functional tests directly exercising ensemble commands00:26
SpamapSHey, me too. :)00:27
SpamapSOn all supported configurations00:27
SpamapS(that last bit is integration testing.. but .. details.. ;)00:28
jimbakerSpamapS, cool. so consider this as an intermediate step00:28
jimbakertrust me, it will be very easy to have this integrated into jenkins in some subsequent step00:28
SpamapSAlright, well yeah, I'd think the time spent outputting HTML would be better spent outputting junitxml that jenkins can read and digest.00:29
SpamapSOn the tests..00:29
SpamapSI wrote a few silly bash scripts that deploy/relate/query the formulas.. and james page came up with a cool way to have formulas embed tests ...00:29
SpamapSwe should have a pow-wow once you've got the test runner doing some stuff.00:29
jimbakerSpamapS, sounds like a plan. i definitely want to hear more about james' ideas00:32
jimbakerSpamapS, we could readily add your bash scripts00:34
SpamapSjimbaker: I need to distill them down to smaller nuggets that can be encapsulated and run wherever.. one challenge is setting up the env w/ an environments.yaml and ssh key and such00:35
jimbakerSpamapS, yeah, that's a much more interesting problem. one thing that we can do w/ building out environments.yamls is do things like running several envs in parallel00:36
jimbakerSpamapS, i do have a variant of sshclient that ignores possible man-in-the-middle, but it would be much better if we managed this properly00:37
jimbakerSpamapS, another thing i did play with was making sshclient much more robust for extremely long waits. at the very least, we might want to have something like a wait-for-ensemble ENVIRONMENT which successively looks at the milestones in an env coming up00:39
jimbaker(it might also be a useful ensemble subcommand in the future, don't know)00:40
SpamapSNot sure what you mean00:43
SpamapSI wrote a wait4state perl script that just runs status00:43
niemeyerjimbaker: This looks nice: https://github.com/defunkt/pystache00:43
SpamapSbut /win 1000:45
SpamapSdoh00:45
jimbakerniemeyer, looks good to me, thanks!00:45
jimbakerSpamapS, but /win...  ?00:46
SpamapSirssi00:46
SpamapShey quick python question00:46
SpamapSdo lists keep an internal length?00:46
niemeyerjimbaker: It's an incarnation of this: http://mustache.github.com/00:46
SpamapSI'm profiling something that does len(giant_list) a lit and it seems to me that removing these calls makes it a lot faster (and just keeping track of the length in a different variable)00:47
niemeyerSpamapS: They do00:47
niemeyerSpamapS: Are you doing tons of those calls?00:47
SpamapSyes00:47
niemeyerSpamapS: function calls in Python are expensive in general.. you may just be seeing that cost00:48
jimbakerniemeyer, yeah, mustache is a fine approach00:48
SpamapS5 for every line of a 500,000 line file....00:48
SpamapSSo I'm not crazy.. its not a massive expense per call.. but it adds up00:48
jimbakerSpamapS, doesn't seem to be so much even for cpython00:48
niemeyerSpamapS: Yeah, definitely.. you'd notice 2.5M Python function calls for sure00:48
SpamapShttp://paste.ubuntu.com/680217/00:49
jimbakerso there, we have two contrasting viewpoints00:49
SpamapSnow to find out where the other 8.8s are spent. :-P00:49
niemeyerjimbaker: You mean you don't find them expensive?00:50
jimbakerniemeyer, i just don't think it's that bad if it's just 2.5M00:51
niemeyerjimbaker:00:52
jimbakerniemeyer, functional call overhead in cpython is obviously quite expensive, for a variety of reasons00:52
niemeyerdef f(): pass00:52
niemeyerstart = time()00:52
niemeyerfor i in range(2500000): f()00:52
niemeyerprint time()-start00:52
niemeyerjimbaker: This takes 1 second in my machine00:52
niemeyerjimbaker: Doing absolutely nothing00:52
niemeyerjimbaker: There's more than a function call there, but gives an idea00:52
jimbakerniemeyer, i'm sure that's the case :)00:52
niemeyerjimbaker: That's what I meant by "you'd notice"00:53
jimbakerit's just that 0.5s as the case w/ SpamapS's perf or 1s for your case is still a relatively small number compared to what i have seen in the past, that's all ;)00:53
jimbakerbut if run in a command, or in the direct path for rendering a page, sure, it's extremely noticeable00:54
SpamapSThat, and things like .append, .sort, etc, are the only function calls..00:54
SpamapSthis script lags the same algorithm in perl by about 15%00:54
SpamapSI was wrong btw, it doesn't do 5 for every line00:54
SpamapSjust 1 len for every line00:54
SpamapSbut yeah, 500,000 is 0.504s00:55
jimbakerSpamapS, did you try it w/ pypy? that would be an interesting exercise00:55
SpamapSjimbaker: I wanted to but didn't know how to even get pypy ;)00:55
jimbakerfunctional call overhead w/ pypy is extremely reduced00:55
niemeyerYeah, should kick ass00:55
SpamapSlol.. lucid, karmic, and jaunty.. :-P00:56
jimbakerhttp://pypy.org/download.html - just give it a try, i don't know where they are on latency00:56
niemeyerTakes 16ms in Go..00:56
niemeyerThe 2.500:56
jimbakerniemeyer, that might be close to pypy for the empty case, factoring out startup. which may or may not be applicable, given the domain00:57
jimbaker(i too should give it a try ;) )00:58
niemeyerMaybe.. haven't tried that kind of thing there yet.. would be curious, though00:58
niemeyerGiven their latest work it must be pretty amazing00:58
jimbakerbbl01:01
SpamapSpretty hard to find pypy binaries.. :-P01:01
_mup_Bug #838568 was filed: push-review must be tested again <Ensemble:In Progress by niemeyer> < https://launchpad.net/bugs/838568 >01:54
=== daker_ is now known as daker
niemeyerAlow!13:57
hazmatjimbaker`, jinja2 is pretty nice re templating engines14:16
_mup_ensemble/local-provider r353 committed by kapil.thangavelu@canonical.com14:24
_mup_remove utility wait_for_node, just make the nesc. method public on zookeeperconnect, allow get open port to take a host option.14:24
jimbaker`hazmat, jinja2 is fine. but let's go with mustache15:00
hazmatjimbaker`, wasn't clear that mustache has any advantage over say.. string.Template15:01
hazmater.. actually string formatters15:05
hazmatmustache looks fine though15:06
jimbaker`hazmat, mustache does one very important thing, which is that it performs html encoding15:08
jimbaker`when compared to string.Template. obviously the mustache {{}} itself is familiar in both templating systems15:09
niemeyerjimbaker`: and loops, I guess15:10
niemeyerLunch time.. biab!15:53
SpamapSniemeyer: can we get push-review from a PPA or something?16:14
SpamapSniemeyer: I *really* like the automation it promises. :)16:14
_mup_Bug #839695 was filed: ensemble.formula.tests.test_bundle.BundleTest.test_executable_extraction fails on empty home dir <Ensemble:New> < https://launchpad.net/bugs/839695 >16:21
SpamapShazmat: re the bug linked above..16:27
SpamapShazmat: its checking for 493 as the stat.. but.. in my bzr co of ensemble, its 509 .. I believe this is because umask has changed on ubuntu..16:28
SpamapSbut I could be wrong16:28
SpamapSindeed.. its just a matter of how you checked out the branch16:29
SpamapSI think the appropriate check is that the stat *matches* the sample.. not that it is exactly 509.. basically we want to make sure exec was preserved16:33
hazmatSpamapS, sounds good16:41
SpamapShazmat: http://pastebin.com/DaaJ1Mp016:45
SpamapSthat is currently building in my PPA.. if it passes all tests, I'll change debian/rules to fail the build on test fail and submit a FFe for revision 336 to upload to Ubuntu.16:46
SpamapS(with the 3 patches I've submitted for review applied.. ;)16:47
niemeyerSpamapS: Absolutely! Working on that already.. should be apt-gettable today16:55
jcastrohey m_3 18:16
jcastrohttp://blog.carbonfive.com/2011/09/01/deploying-node-js-on-amazon-ec2/18:16
_mup_Bug #839794 was filed: Final test for the tool! <Ensemble:In Progress by niemeyer> < https://launchpad.net/bugs/839794 >18:17
jcastrowould now be a good time to ask how the node standalone formula is coming along?18:17
jimbaker`jcastro, i like how that blog post begins: "After nearly a month of beating my head against the wall that is hosted node.js stacks — with their fake beta invites and non-existent support..."18:45
m_3jcastro: hey18:46
m_3jcastro: yeah, the node formula was part of a talk I gave on IRC a few weeks ago18:47
m_3jcastro: I'll brush it off, promote it to principia, and blog about it18:47
jcastrom_3: do you have time to post a response to the guy? 18:47
jcastroit reads to me like he needs ensemble hard core18:47
m_3jcastro: yeah, I'll do it during a boring talk this afternoon18:49
jcastrooh sorry, forgot you were travelling18:49
m_3jcastro: conf wraps up today, so I'll be able to put time on it over the weekend18:50
=== niemeyer_ is now known as niemeyer
=== daker is now known as daker_
negronjljcastro: ping19:51
jcastronegronjl: pong19:55
negronjljcastro:  in a meeting right now.. I'll ping you later19:56
* jcastro nods19:56
_mup_ensemble/local-unit-deploy r354 committed by kapil.thangavelu@canonical.com19:56
_mup_factor out unit environment retrieval into separate method.19:56
_mup_ensemble/local-unit-deploy r355 committed by kapil.thangavelu@canonical.com20:14
_mup_user/environment qualified lxc container name, tweak upstart job20:14
_mup_ensemble/local-unit-deploy r356 committed by kapil.thangavelu@canonical.com20:28
_mup_additional test for qualified container name20:28
hazmatSpamapS, does upstart do env expansion  on the exec stanza?21:01
SpamapShazmat: yes21:11
niemeyerOkay.. lpad is out, lbox is out.. back to reviews and porting formulas 21:24
niemeyerBut I'll step out for now.. may do some extra time tomorrow for helping on the queue21:25
* niemeyer bbl21:26
_mup_ensemble/local-unit-deploy r357 committed by kapil.thangavelu@canonical.com21:33
_mup_have upstart respawn and run the container in the foreground, doc strings for all container deployment methods.21:33
* robbiew needs a drink21:36
hazmatexcellent idea21:44
SpamapShazmat: upstart for containers, but not for the agents?!21:49
hazmatSpamapS, for the agent21:51
hazmatunit agent only21:51
hazmatinside a container21:51
hazmatits not truly restartable.. probably shouldnt' be respawn auto21:52
* hazmat returns with a bloody mary21:52
hazmatSpamapS, one nice fallout of the local dev stuff, it should be pretty easy to use this for arm servers, with an external zk address.21:53
SpamapStask tsk.. we need our idempotency. :)21:53
SpamapS:)21:53
* hazmat reruns tests to ascertain potency21:53
SpamapSoh I thought you were saying that its not re-startable because of some problem with idempotency21:56
hazmatSpamapS, the real issue is loss of events while the agent was down,  in practice its probably not an issue, except when it is22:09
SpamapSerr.. events?22:10
hazmatno good reason not to go ahead with it i suppose22:10
SpamapSI thought we just watched to see what the state was22:10
SpamapSif we miss 4 changes, who cares, just make the new state true.22:10
hazmatSpamapS, if the agent is down, watches won't be delivered22:10
hazmatand extant watches need to be restablished as new watches potentially22:11
SpamapSif we need that, we need a queue, not a data store22:11
SpamapSBut I see what you're saying22:11
hazmatwe're delivering a queue/event interface to formulas, but disconnections mean establishing a delta between state on reconnect to inform the formula of the events between the watch restablishment22:12
SpamapSwhat we need is to keep track of what state the agent thinks it is in, so when it comes back up it can do the appropriate transitions.22:12
SpamapSThats not a queue.. thats a watched data store.22:12
hazmatyup22:12
SpamapSConvenient, yes, but not a queue. :)22:12
hazmatits really a sync between a remote and local data store22:12
hazmatto compute the delta22:12
SpamapSI see the problem.. very interesting22:13
hazmatin truth its probably a very rare issue in practice for a respawn22:13
hazmatfor a net split its more significant22:13
hazmator any long running outage22:13
SpamapSyeah, so at the moment, ensemble is not partition tolerant. ;)22:13
* SpamapS disappears22:16
hazmatSpamapS, have a good weekend22:16
jimbaker`how do i push a branch that's a branch of lp:~ensemble/ensemble/ftests ? i tried this, but it's not right: bzr push --stacked-on lp:~ensemble/ensemble/ftests --remember lp:~jimbaker/ensemble/ftests/generate-html22:55
jimbaker`niemeyer, ^^^ ?23:02
_mup_ensemble/local-unit-deploy r358 committed by kapil.thangavelu@canonical.com23:09
_mup_use ensemble home instead of units directory for all unit deployments23:09
hazmatjimbaker`, i think you just push to ~jimbaker/ensemble/generate-html23:09
hazmatits on the merge side you pick the series branch afaik23:10
* hazmat checks23:10
jimbaker`hazmat, ok, i was wondering why it was wanting to use the wrong series23:10
hazmatyup23:10
hazmatjimbaker`, so on merge the target branch is ensemble/ftests23:11
hazmatthere all branches of the same project for the user project namespace23:11
hazmats/their23:11
_mup_Bug #839969 was filed: Checkout Ensemble branch, run bash ftests, and generate summary in HTML <Ensemble:In Progress by jimbaker> < https://launchpad.net/bugs/839969 >23:15
hazmatjimbaker`, is the ftest stuff using jenkins for test running?23:18
jimbaker`hazmat, no23:18
hazmatjust wondering if we could submit tests for branches in dev23:18
hazmatvia an api23:18
hazmatw/ the security integration tests get about 30% slower out of the box on average...23:19
jimbaker`tests will get merged as normal i would think. at some point, we will have jenkins integration, it would be simple/trivial to do23:19
hazmatjimbaker`, i guess i'm confused what's running the tests? your not using jenkins or buildbot?23:19
jimbaker`i'm using two new tools: butler.py, which i just wrote; and niemeyer's churn, which executes bash scripts23:21
jimbaker`a butler used to manage the buttery, which might store the results of the churning...23:21
jimbaker`and of course jenkins is presumably a butler. whatever ;)23:22
hazmatnot sure i understand why.. but okay23:22
jimbaker`hazmat, at some point jenkins is presumed. twisted trial however is definitely not going to be used23:22
jimbaker`the reason is that we need something that is focused on running ensemble commands23:23
hazmatjimbaker`, i assume the test runner would be doing normal tests and ftests23:23
hazmatis that not accurate?23:23
jimbaker`that's not accurate23:23
jimbaker`it's only running ftests, which are to be only be written using bash23:23
jimbaker`that's niemeyer's decision, and it makes sense23:24
hazmatfrom a purpose of ease of test dev for users probably23:24
jimbaker`such test scripts could potentially use resources that are written in python, eg to validate results or to wait for resources23:24
hazmatstill i seems like conflating issues, an ftest suite and test suite, and the test bot 23:25
jimbaker`hazmat, perhaps, but it's hopefully what was requested by niemeyer. again i think it's pretty simple, and it will integrate well w/ jenkins eventually, just need to emit junitxml instead of the summary html file23:26
hazmatjimbaker`, fair enough.. we need a test runner for the ftests that does reports23:26
jimbaker`and that's the merge proposal :)23:27
hazmatbcsaller, do you have a moment to catch up?23:32
bcsallerhazmat: sure do23:33
hazmatbcsaller, ~hazmat/ensemble/local-unit-deploy is the latest in the pipeline23:47
bcsallerhazmat: thanks23:47
niemeyerjimbaker`: lbox propose --for lp:ensemble/ftests23:59
niemeyerSorry, single dash23:59
niemeyerjimbaker`: lbox propose -for lp:ensemble/ftests23:59

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