/srv/irclogs.ubuntu.com/2015/03/04/#launchpad-dev.txt

blrwgrant: the lack of that feature unfortunately means the diff api test is less than ideal. not entirely sure what to do about that02:37
blrwgrant: here if you have a moment to look https://code.launchpad.net/~blr/turnip/api-diff02:53
wgrantblr: The lack of which feature?04:01
blrpatch parsing04:01
blrsorry split-channel context :P04:01
wgrantOh, #ci, right.04:01
wgrantJust catching up.04:01
blrwgrant: test is a bit braindead (test_repo_compare_commits() in http://bazaar.launchpad.net/~blr/turnip/api-diff/revision/96 test_api.py) without patch parsing04:03
blron a related note, have since moved some of that pygit2 ugliness to test_helpers property in a later revision.04:04
wgrantblr: We can write some better tests if we construct a known tree and check for relevant +/- lines etc.04:07
blrwgrant: right, that would be better, but will still need to regex the json body.04:07
blrwgrant: just trying to think about how to achieve that within the context of http://bazaar.launchpad.net/~blr/turnip/api-diff/view/head:/turnip/api/tests/test_helpers.py04:09
blrwgrant: afaict, I can't _apply_ a patch with pygit2 either.04:10
wgrantblr: I don't believe there's a way to do that today, no.04:11
wgrantFortunately we don't need to right now :)04:11
wgrantblr: It probably makes sense to have a test helper that constructs a tree given a dict of {path: content}, allowing us to easily create commits that look as we desire.04:13
wgrantThat would make the diff test quite simple.04:13
blrthat makes sense... is what is there currently reasonably sane?04:13
wgrantblr: Looks generally sensible to me!04:16
blrwgrant: great, thanks04:16
wgrantblr: Any idea why the turnipcake charm doesn't seem to expose any ports? I can see them defined in the service config, just like in turnip, but juju status doesn't show them.06:25
wgrantOh, it would help if I added the relation so the services framework actually started it, wouldn't it.06:30
lifelesswgrant: test helpers for file trees - bzr has one already06:48
lifelesswgrant: if you can't reuse that, you could add one to fixtures easily enough, I'd be happy to accept a patch extending the existing stuff06:49
wgrantlifeless: "tree" as in the git object, not an actual tree.06:49
lifelesswgrant: sure; probably one of those in jelmers git protocol impl :)06:49
wgrantIndeed.06:51
=== Peng_ is now known as Peng
wgrantcjwatson: Hrm, did you run the test suite after your turnip changes to introduce authenticated-uid?08:01
cjwatsonwgrant: I'd hope so, but it was a while back so I don't specifically remember.  And I guess not given that you're asking the question ...08:58
wgrantcjwatson: Heh, yeah, it was all very broken.08:59
wgrantFixed now, and I've adjusted setup.py so "setup.py test" runs the full suite now.09:00
wgrantI'd been using "python -m unittest discover turnip", didn't realise "setup.py test" had been made to nearly-work.09:00
cjwatsonwgrant: Thanks, sorry about that!09:07
wgrantcjwatson: np, the fixes were easy. Just a bit confusing that the world was screwed when I was jujuing.09:12
wgrantcjwatson: With that review out of the way, is anything left blocking you?10:53
cjwatsonwgrant: Nope, thanks.10:54
blr_wgrant: did you get the turnipcake ports open?19:18
blr_lifeless: presumably you were referring to something in dulwich? Writing test helpers wrapping pygit2 atm to make git repo/object fixtures easier. On a tangential note, a lot of things I'm trying to achieve would be much easier in bzrlib!19:21
lifelessblr_: yes19:22
=== blr_ is now known as blr
blrI'll have a look through the dulwich source for inspiration, thanks19:23
blrwgrant: my diff api MP has unmerged changes from api-ref (ready for re-review), perhaps just consider both in the new MP and I can delete the other?22:24
wgrantblr: Ah, yeah, that probably makes sense.22:30
wgrantblr: Sorry, got distracted by juju yesterday...22:30
blrno worries - did you get turnipcake up in the end?22:30
wgrantblr: Yep, found a few issues with both charm and code on the way, but I know my way around enough to fix the charms now.22:35
wgrantThe services framework stuff seems to make them muuuuch nicer.22:35
wgrant(I created a whole lot of Asana tasks for most of the issues I found, as I blundered through)22:35
blrwgrant: yes, I removed lots of boilerplate once I switched to the services framework.22:36
blrwgrant: if turnip.endpoint was in /srv/envs it should have been available in the environment which will override the default set in the pyramid config22:40
blror am I missing something22:40
blrturnip.endpoint in turnipcake.ini22:41
wgrantblr: It didn't seem to be overriding it. I couldn't see code that read it.22:41
blrwgrant: that's pyramid's default behaviour22:41
wgrantorly22:42
blrhttp://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/environment.html22:42
blrwhich is pretty sensible!22:42
blr+1 pyramid22:42
blrit will translate MY_ENV_VAR to my.env.var as well22:43
blra concern if it isn't actually working though :/22:43
wgrantblr: I don't think that works in general.22:44
wgrantIt would be rather unsafe if it did.22:44
wgrantYeah, the pyramid.config.settings does this sort of thing:22:45
wgrant        config_debug_auth = self.get('pyramid.debug_authorization',22:45
wgrant                                     config_debug_auth)22:45
wgrant        eff_debug_auth = asbool(eget('PYRAMID_DEBUG_AUTHORIZATION',22:45
wgrant                                     config_debug_auth))22:45
blrwgrant: ah I see, it is limited to a specific set of config values22:47
blrwelp, I can see why that wouldn't be working in that case, apologies.22:49
blrmight be worth reassessing the state of amulet, to have some basic integration tests in place for these relations22:52
wgrantblr: Easy enough for me to fix, I suspect.22:52
wgrantI still don't know quite where amulet fits with mojo.22:52
blrno, nor am I...22:53
wgrantblr: (I'm glad it's broken like this; Pyramid allowing any option to be overridden by a non-prefixed envvar would have made me switch away from it.)22:53
blrwgrant: you're right, that would be a little terrifying.22:53

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