/srv/irclogs.ubuntu.com/2015/07/02/#cloud-init.txt

openstackgerritJoshua Harlow proposed stackforge/cloud-init: Add importlib for python 2.6 *only*  https://review.openstack.org/19769100:13
=== rangerpb is now known as rangerpbzzzz
harlowjaok seems good to go ^ smoser ^00:39
harlowjaall fixed up00:39
=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
smoserOdd_Bloke, do you have some time today that we could look at the reporting stuff ? i'd like to make some progress on that.12:17
Odd_Blokesmoser: Potentially; looking at relatively important partner stuff at the moment.12:17
smoserOdd_Bloke, how do i make jenkins re-test something ?12:21
Odd_Blokesmoser: Pushing up a new patchset should do it automatically.12:25
smoseryeah, but i think theres a way to say "re-run".12:25
smoserohwell.12:25
Odd_Blokeharlowja will probably know, when he wakes up in 3 days or so. :p12:25
Odd_Blokesmoser: Why do you need to rerun without any changes?12:26
smoseri wasnt sure how the py26 stuff was fixed. thought it was actually not related.12:26
openstackgerritScott Moser proposed stackforge/cloud-init: pip2distro: work in progress: build tox env for specific targets  https://review.openstack.org/19767112:35
Odd_Blokesmoser: Ah, good point about using setup in timeit.12:56
=== rangerpbzzzz is now known as rangerpb
Odd_BlokeOTOH, we _aren't_ using the regex more than a handful of times, so I think my examples were more valid than they appeared.12:56
Odd_BlokeBut it was a minor point; I don't particularly mind which we do. :)12:56
smoserharlowja, please ping when you wake up.13:59
smoserreally want to resolve the py26 stuff today.13:59
smoserhttps://review.openstack.org/#/c/197691/14:00
smoserOdd_Bloke, i have no objection to using unittest214:01
smoseri dont fully understand:14:01
smoserThis would mean we couldn't use testtools' TestCase class, but we would still be able to use their matchers in our assertions, if we so wished (http://testtools.readthedocs.org/en/latest/for-test-authors.html#assert-that-function).14:01
smoserclaudiupopa, do you have any objection to unittest2 ?14:02
claudiupopadoes it have assertRaises as a context manager? ;-)14:02
claudiupopaNo, no objection.14:02
Odd_Blokesmoser: So we're using testtools.TestCase, which inherits directly from unittest.TestCase.14:05
Odd_Blokesmoser: It is therefore incompatible with using unittest2.TestCase as our root test case.14:05
smoserah. ok.14:05
claudiupopaWhy are we using testtools? What benefits does it bring us?14:05
Odd_Bloke^ I'm curious about this as well.14:06
Odd_Bloke(I think testtools has useful stuff, I just don't think we're using any of it ATM :p)14:06
smoseri have no attachment to it14:07
smoserit blames to14:07
smoser http://paste.ubuntu.com/11810295/14:07
smoseris setUp and tearDown stuff it provides ?14:08
smoserguess not14:09
claudiupopaNope, that's in unittest as well.14:10
smoserok, we really need to resolve this today, as all tests fail on on the py26 gate right now.14:33
smoserOdd_Bloke, did you see my comment at https://review.openstack.org/#/c/170257/4/cloudinit/templater.py  ?14:54
Odd_Blokesmoser: Re: timeit?14:54
smoseryeah.14:54
smoseram i wrong ?14:54
smoserthere definitely *is* a pentalty for compiling, but it does make up for itself.14:55
smoser(assuming it gets used)14:55
Odd_Blokesmoser: If you use the regex a lot, yeah.14:55
Odd_BlokeSo the truth is somewhere between our two benchmarks.14:55
Odd_Bloke:p14:55
Odd_BlokeMine tests the worst case (we use it zero or one times).14:56
Odd_BlokeYours tests the best case (we use it 1000s of times).14:56
smoserwell, but yours has so much noise14:56
smoserre.compile() seems to take about as much time as 'import re'14:56
Odd_BlokeThe actual truth: we've spent more time discussing/thinking about this than is likely to be saved by selecting the correct option across all instances forever. ;)14:57
smosercorrect14:57
=== zz_natorious is now known as natorious
smosernow lets get thsi stupid py26 stuff settled.14:58
* smoser waits for harlowja 14:58
Odd_BlokeThat guy.15:03
Odd_BlokeDoes he ever wake up.15:03
Odd_Blokeharlowja: What does testtools actually get us over unittest2?15:24
Odd_Bloke(Except for ugly exception testing :p)15:24
harlowja_at_homefixtures integration, having to figure out what to do about py3 (unittest2 only works on py2.x), so we'd end up making a mini testtools anyway, testtools also heavily used throughout openstack so its common ground.... the author is helpful and involved in openstack to15:26
harlowja_at_homesame author owns unittest2 :-P15:26
harlowja_at_homea bunch of other matchers, https://github.com/testing-cabal/testtools/tree/master/testtools/matchers15:27
harlowja_at_homeintegration with https://github.com/testing-cabal/fixtures15:27
harlowja_at_home...15:27
harlowja_at_homeso thats my 2 cents15:28
harlowja_at_hometesttols is using unittest2 anyway and its providing the py2/py3 compat15:29
harlowja_at_homeneed me to ask the author to jump in here (he's in new zealand) so he's probably not awake yet15:30
Odd_Blokeharlowja_at_home: lifeless?15:30
harlowja_at_homeyes15:30
Odd_Blokeharlowja_at_home: So you can use the matchers outside of the TestCase.15:30
Odd_Bloke(I know this because I wrote the function that supports doing it ;)15:31
harlowja_at_homeok15:31
Odd_BlokeI thought unittest2 worked on 2 and 3.15:31
harlowja_at_homehttps://hg.python.org/unittest2/file/d091f0086b03/setup.py#l4015:31
harlowja_at_homeso seems not15:32
Odd_Blokeharlowja_at_home: The description at https://pypi.python.org/pypi/unittest2 says "It is tested to run on Python 2.6, 2.7, 3.2, 3.3, 3.4 and pypy."15:32
Odd_Bloke*shrugs*15:32
Odd_BlokeSHURG15:33
harlowja_at_homelol15:33
harlowja_at_homeguess the classifiers haven't been updated15:34
Odd_Blokeharlowja_at_home: Maybe because it doesn't make sense to use for later versions?15:35
Odd_Bloke(Or maybe just olde)15:35
harlowja_at_homeprobably15:36
* harlowja_at_home shrugs15:38
harlowja_at_homelol15:38
harlowja_at_homeanyways, will be off most of today, for some reason they gave us 2nd & 3rd off16:17
=== natorious is now known as zz_natorious
smoserdagummit.16:25
smoserharlowja_at_home, want to get through this  py2.6 thing16:25
smoseri dont have strong feelings on fixtures/unittest2/testtools16:25
smoserbut do have strong feelings on jenkins gate job failing :)16:25
smoserand also my feeling is that less dependencies is better.16:25
harlowja_at_homesmoser, ya, only feeling i have is that this is what the rest of openstack uses, it has some nice helpers, losing a context manager, meh16:26
smoseralso, harlowja_at_home right now onyour branch, if i 'tox -e py27' it doesn't work.16:26
harlowja_at_homeits a test-time-dependency16:26
smosercomplains of the importlib;python_ver==2.616:26
smoseror whatever that is.16:26
harlowja_at_homeyup, upgrade pip16:26
smoser:-(16:26
smoserupgrade pip is not too easy though.16:26
harlowja_at_homeya, not much i can do about that one, this change for all these in pbr is forcing this throughout all of openstack16:27
smoserbut i just remembered system i'm running it on is 14.04 where usually i do wily16:27
harlowja_at_homefor better or worse16:27
harlowja_at_homeya, i've also got my 14.04 vm and now have to uprade pip, sorta blows16:27
smoserwhat version do you need ?16:27
smoserhttps://launchpad.net/ubuntu/+source/python-pip16:28
harlowja_at_home6+ i think16:28
smoserwily is 1.5.616:28
harlowja_at_homeafaik only pip 6+ understands version markers16:28
harlowja_at_homehttp://lists.openstack.org/pipermail/openstack-dev/2015-June/067823.html16:29
harlowja_at_homeand such from robert16:29
harlowja_at_homei'm pretty sure that these changes are gonna force many distros to have a massive pip upgrade16:30
smoserare these version numbers the same ? 1.5.6 is in wily, but i need 6?16:30
harlowja_at_home6.0+16:30
harlowja_at_homethey did a huge version number bump, from 1.5 -> 6.016:30
harlowja_at_homenow its 7.0 i think, lol16:31
harlowja_at_home* https://pypi.python.org/pypi/pip (7.1)16:31
smoserok.16:31
smoserso i'd kind of like to avoid this.16:31
smoserthe only thing we're needing it for is python2.6 needing importlib16:31
smoser(at least at this point)16:31
smoserright ?16:31
harlowja_at_homeya16:32
smoserin our tox environment we can easily enough just use a different py26 requirements environment then everything else.16:32
harlowja_at_homethat is possible to16:32
smoseri think i like that better at the moment.16:32
smoserthan making people (including me) install pip from outside of distro16:33
smoserit'd be more acceptable if at least wily had a suitable pip16:33
harlowja_at_homeya, i'm pretty sure now that openstack is using those markers, alot of people are gonna have to upgrade16:33
harlowja_at_home*for better or worse*16:34
smoserok. so my take out of the above is16:35
smosera.) use testtools unless Odd_Bloke cries16:35
smoserb.) remove requirement of newer pip as smoser is a luddite16:35
harlowja_at_home:-P16:36
smoserif you're on holiday i can try to do that.16:36
harlowja_at_homei get it done, but probably heading out soonish16:36
smoseri just need some sane path to running this on ubuntu, and "download pip from the intertubes" isn't really sane16:36
harlowja_at_hometime to get an upgrade :-P16:36
smoserharlowja_at_home, you are allowed to not do this today :) its ok for you to celebrate your countries independence from the queen16:36
smosercountry's even.16:37
harlowja_at_homelol16:37
smoser(if you only have the one)16:37
harlowja_at_homeobama the queen16:37
Odd_Blokesmoser: FWIW, using a virtualenv on Ubuntu solves the pip problem.16:37
harlowja_at_homeya, its still a pita though :-P16:37
harlowja_at_homecreate virtualenv, enter virtualenv, install newer pip16:38
smoserusing virutalenv to run tox which runs creates a virtualenv16:38
smoseri really like the simplicity of 'tox'16:38
openstackgerritJoshua Harlow proposed stackforge/cloud-init: Add importlib for python 2.6 *only*  https://review.openstack.org/19769116:41
harlowja_at_homeok let's see what happens16:41
smoserwhat'd you do ?16:46
smoseryou took importlib out ?16:46
smoseroh. isee.16:47
smoserbut the py26-gate thing wont figure that out, will it ?16:47
smoserseems to have figured it out;16:51
smoser https://jenkins02.openstack.org/job/gate-cloud-init-python26/1/16:51
smoseri have a feeling that we should have a template engine that uses python formatting.17:04
smoseras probably immediately more powerful and better documented than 'builtin'17:05
smoserand no dependencies17:05
smoserbut it might not be sufficent for how we want to expose objects to templating.17:06
Odd_BlokeThe new formatting syntax is pretty comprehensive.17:10
harlowja_at_homecloud-init-formatter-v100017:10
harlowja_at_homelol17:10
Odd_BlokeThough we should investigate if you can do anything untoward using it. :p17:10
smoserOdd_Bloke, i dont think i can access object.property17:11
smosercan i ?17:11
Odd_Blokesmoser:17:11
Odd_Blokesmoser: Sure.17:11
Odd_Blokesmoser: http://paste.ubuntu.com/11811141/17:11
smoserawesome.17:12
* harlowja_at_home pretty sure i made that possible :-P17:12
smoserok. so yeah, i like this.17:12
smoserharlowja_at_home, you did. you rock.17:12
harlowja_at_homeoh, i think thats the built-in python formatting, nothing i did :-P17:12
smoserright.17:12
smoserthats what i'm saying we should offer as a templating option17:13
harlowja_at_homeah17:13
harlowja_at_homeexcept afaik it only got good on 3.0 +17:13
harlowja_at_homehttps://www.python.org/dev/peps/pep-3101/17:13
Odd_BlokeOh, Python 2.6 might be screwed.17:14
harlowja_at_homeand 2.7?17:14
Odd_BlokeThat example is on 2.7.17:14
harlowja_at_homek17:14
harlowja_at_homeguess they must of backported some of it17:14
harlowja_at_homeor something17:15
Odd_BlokeJust tested it, and the above works on 2.6.17:15
harlowja_at_homecool, up to u guys17:16
smoseri think makes sense to add it17:22
smoserand will just fail on py2.6 .17:22
smoserhttps://review.openstack.org/#/c/197691/5/cloudinit/sources/openstack/httpopenstack.py17:22
smoseras seen there, you had to make that change as the .format didnt' work on py26 right?17:22
smoserOdd_Bloke, could you review https://review.openstack.org/#/c/197691/17:23
smoserit is sane to me.17:23
smoserthe one thing ihave left is that we added the py26 environment, which means 'tox' will fail now on any recent ubuntu. where as previously it would pass ( as we didn't need py26)17:26
harlowja_at_homeu running all the tox envs?17:29
harlowja_at_homefor fun17:29
smoserwell, i want to run 27 and 34 for sure by default17:32
=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
openstackgerritMerged stackforge/cloud-init: Add importlib for python 2.6 *only*  https://review.openstack.org/19769117:51
openstackgerritJoshua Harlow proposed stackforge/cloud-init: Bring over the 'templater' from bzr  https://review.openstack.org/17025717:52
openstackgerritJoshua Harlow proposed stackforge/cloud-init: pip2distro: work in progress: build tox env for specific targets  https://review.openstack.org/19767117:53
openstackgerritJoshua Harlow proposed stackforge/cloud-init: tools/tox-venv: support running other than ./tools/tox-venv  https://review.openstack.org/19563117:53
openstackgerritJoshua Harlow proposed stackforge/cloud-init: Expose api response properties and cache buffer decoding  https://review.openstack.org/19580017:54
smoserwhy does tox docs not work17:54
smoser:-(17:54
smoserhttp://paste.ubuntu.com/11811416/17:55
smoserhttps://bugs.launchpad.net/oslotest/+bug/137999817:57
harlowja_at_homeno idea, jump on #openstack-oslo ask pbr folks?17:59
smoserharlowja_at_home, well. this fixes it.18:03
smoserbut i dont know how that bug reports fixed in oslotest18:03
harlowja_at_homeya, not sure18:04
smoserhttp://paste.ubuntu.com/11811486/18:04
smoserthat fixes it.18:04
smoserbut will break again when 1.3b4 is released unless its fixed there.18:04
harlowja_at_homeya18:04
harlowja_at_homeok, i'm off18:05
harlowja_at_homewill be on maybe at night or something, ha18:05
smoserok.18:06
openstackgerritScott Moser proposed stackforge/cloud-init: fix 'tox -e docs' by limiting sphinx versions  https://review.openstack.org/19808018:09
openstackgerritMerged stackforge/cloud-init: Bring over the 'templater' from bzr  https://review.openstack.org/17025718:13
smoserif someone else could check my work on https://review.openstack.org/#/c/198080/18:14
smoseri'd appreciate it. Odd_Bloke claudiupopa ^18:14
openstackgerritMerged stackforge/cloud-init: Bring over the 'safeyaml' from bzr  https://review.openstack.org/17025218:16
openstackgerritMerged stackforge/cloud-init: tools/tox-venv: support running other than ./tools/tox-venv  https://review.openstack.org/19563118:16
openstackgerritScott Moser proposed stackforge/cloud-init: fix 'tox -e docs' by limiting sphinx versions  https://review.openstack.org/19808021:18
=== rangerpb is now known as rangerpbzzzz
openstackgerritScott Moser proposed stackforge/cloud-init: Expose api response properties and cache buffer decoding  https://review.openstack.org/19580021:37
openstackgerritMerged stackforge/cloud-init: fix 'tox -e docs' by limiting sphinx versions  https://review.openstack.org/19808021:38
openstackgerritMerged stackforge/cloud-init: Expose api response properties and cache buffer decoding  https://review.openstack.org/19580021:42
smoserwhy can't anything be easy.21:44
smoserattempt at running http://paste.ubuntu.com/11812524/ on vivid21:44
smoserresults in http://paste.ubuntu.com/11812519/21:44
smoserand, oh joy. py34-coverage and py27-coverage now fail.21:45
smoserfail as in we dont have 90% coverage.21:45
smoserOdd_Bloke, ^ claudiupopa ^ feel free to fix that. :)21:45

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