[00:34] <cjwatson> benji: thanks for your review of https://code.launchpad.net/~cjwatson/launchpad/api-build-builder/+merge/101162; would you mind landing it for me?
[00:40] <lifeless> StevenK: enterpriseid probably needs a fixup approach
[00:40] <lifeless> StevenK: otherwise it will become a source of circular imports
[00:41] <lifeless> cjwatson: I'm loving your recent stuff :)
[00:41] <lifeless> cjwatson: are you finding the LoC constraint problematic ?
[00:42] <lifeless> wgrant: StevenK: wallyworld: one of you reprobates should be around and able to land cjwatson's branch ?
[00:42] <cjwatson> lifeless: I'm not sure; I alternate between finding it a tedious source of busywork and thinking it's a useful way to make the codebase less of an inaccessible monster
[00:42] <wallyworld> lifeless: sure, even though i'm not sure what a reprobate is
[00:43] <cjwatson> lifeless: so far I've had enough sources of crap to remove that it's not been too bad
[00:43] <cjwatson> (in practice)
[00:43] <wallyworld> cjwatson: which branch do you need landed?
[00:43] <cjwatson> wallyworld: https://code.launchpad.net/~cjwatson/launchpad/api-build-builder/+merge/101162
[00:43] <lifeless> wallyworld: thanks
[00:43] <wallyworld> np
[00:43] <lifeless> wallyworld: lossely, scoundrels
[00:44] <wallyworld> lifeless: clearly i need to have a thesaurus handy when talking to you :-P
[00:44] <cjwatson> lifeless: Francis muttered something a few months back about possibly giving me PQM access; what oaths would I need to swear in blood for that?
[00:45] <lifeless> cjwatson: an rt asking for it, webops can talk you through the bits
[00:45] <cjwatson> this branch will take me to joint second non-LP Canonical contributor :)
[00:46] <cjwatson> lifeless: OK, great, I'll put that in tomorrow
[00:46] <spm> cjwatson: it's tomorrow, today.
[00:46]  * spm messes with colin's mind
[00:46] <cjwatson> my family are about to go away for a few days, so I fully expect to be on weirdo timezones
[00:48] <nigelb> spm: that took a bit to understand... future ma.
[00:48] <nigelb> *man
[00:48]  * spm bows, todays troll achievement, unlocked. *ding*.
[00:49] <lifeless> spm: don't forget to do it daily; tis classic grinding
[00:50] <spm> lifeless: indeed. this is the cross I bear
[00:57] <StevenK> lifeless: If you mean fixup like _schema_circular_imports, I object.
[00:57] <lifeless> StevenK: I imported enterpriseid_to_object from lp.services.mail and the world ended
[00:58] <StevenK> lifeless: Sure, so it needs a solution, but I *hate* _schema_circular_imports as a pattern and do not want to repeat it.
[00:58] <lifeless> sure
[00:59] <lifeless> wallyworld: thesaurus :
[00:59] <lifeless> https://www.google.com/search?q=reprobate&client=fs
[01:00] <StevenK> He is calling us villianous
[01:00] <wallyworld> lifeless: i was being rhetorical before :-)
[01:00] <lifeless> wallyworld: :P
[01:00] <StevenK> lifeless is an expert at answering questions you weren't asking.
[01:01] <cjwatson> lifeless: I am curious whether you expect the LoC constraint to actually result in a net reduction of code by some point, I must say :-)
[01:01] <lifeless> cjwatson: if it stops the bleeding, I will be content
[01:01]  * cjwatson nods
[01:01] <lifeless> cjwatson: I expect the cultural values to shift over time
[01:01] <wallyworld> StevenK: perhaps he knows they need answering before we do
[01:01] <lifeless> cjwatson: and once that happens, we've won
[01:02] <lifeless> cjwatson: I see rules as, at most, a way to flag things that are likely problematic from the desired values
[01:02] <StevenK> lifeless: How do you suggest we fix enterpriseid?
[01:04] <lifeless> StevenK: there are three general patterns I know of; one is to have the module provide framework but no registrations - and then register into it
[01:04] <lifeless> StevenK: the second is to use something lazy - e.g. lazy_import, or local imports in factory-functions, to let the module not import the world but still know about it
[01:05] <lifeless> StevenK: the third is to put all the needed imports at the end of the module after the things it exports
[01:05] <lifeless> e.g.
[01:05] <lifeless> imports
[01:05] <lifeless> public thing
[01:05] <lifeless> public thing
[01:05] <lifeless> more imports
[01:05] <StevenK> I dislike the imports at the end as a pattern too.
[01:05] <lifeless> my first inclination is to use the solution we have used elsewhere
[01:06] <lifeless> and IFF that works worse for this case than those cases, hunt for something else.
[01:06] <lifeless> but I'm lazy
[01:06]  * StevenK stabs _schema_circular_imports and then twists the knife.
[01:08] <lifeless> wgrant: lp:~lifeless/launchpad/notificationapi is my <rough and minimal> sketch
[01:09] <wgrant> aaaa
[01:09] <wgrant> phew, it's not scanned yet
[01:14]  * lifeless goes hunting for test case code matching 'please run jobs'
[01:18] <wgrant> yay, go's next stupid package manager reimplementation has debconf questions
[01:19] <lifeless> there was a prior one?
[01:20] <wgrant> I mean "next" as in "next in the line of programming language designers ignoring nearly 20 years of prior art and doing it all again themselves because fuck every other language"
[01:20] <StevenK> Sounds like Go.
[01:21] <StevenK> Those who don't understand history are doomed to repeat it.
[01:22] <StevenK> (Is my bitterness about Go showing yet?)
[01:26] <wallyworld> StevenK: we (Canonical) seem to be jumping on the Go bandwagon?
[01:27] <StevenK> Only because Gustavo is pushing it.
[01:28] <wallyworld> sure one person doesn't make policy though
[01:31]  * StevenK pulls the messaging indicator out, and stabs it through the heart.
[01:32] <StevenK> The message it considers unread is OPEN in Thunderbird
[01:33] <lifeless> wgrant: StevenK: https://bugs.launchpad.net/launchpad/+bug/30496 seems half-or-more-done, could I impose on one of you to either translate whats remaining for me, or do so in the bug ?
[01:33] <_mup_> Bug #30496: [feature-request] status pages for uploaded packages <feature> <lp-soyuz> <Launchpad itself:Triaged> < https://launchpad.net/bugs/30496 >
[01:33] <lifeless> StevenK: and Mark is too
[01:34] <lifeless> dunno exactly how the wagon is structured.
[01:34] <StevenK> lifeless: I'm trying to contain my bitterness since this is a public forum.
[01:34] <lifeless> StevenK: indeed
[01:36] <wgrant> lifeless: It wants something like http://qa.ubuntuwire.org/ftbfs/ but with more queue integration etc
[01:36] <StevenK> And expiring old entries
[01:37] <wgrant> That does expire old entries :)
[01:38] <lifeless> so, can you edit the summary to reflect this ?
[01:38] <lifeless> right now, my eyes glaze and roll back in my head
[01:39] <StevenK> Welcome to Soyuz
[01:39] <bigjools> heh
[01:41] <lifeless> well, its more the description is awkward
[01:41] <nigelb> I realy need to setup a launchpad qdb
[01:41] <nigelb> and, of course, put everything spm says.
[01:41] <StevenK> Haha
[01:41] <lifeless> it should either describe the symtoms - the things users can't do - or if its going to ask for something, ask directly rather than in semi-passive phrases
[01:42] <spm> :-)
[01:42] <bigjools> are you saying that everything that spm says is a joke?
[01:42] <ajmitch> nigelb: but he's so entertaining
[01:42] <nigelb> bigjools: everything he says in launchpad-dev. I suspect he does work in other channels ;)
[01:42] <nigelb> ajmitch: Indeed!
[01:42] <lifeless> wgrant: StevenK: will you guys be drive-by fixing https://bugs.launchpad.net/launchpad/+bug/249112 ?
[01:42] <_mup_> Bug #249112: Changing security status requires clicking "This report is public" <confusing-ui> <lp-bugs> <Launchpad itself:Triaged> < https://launchpad.net/bugs/249112 >
[01:42] <bigjools> "work"
[01:42] <bigjools> ;)
[01:42] <wgrant> lifeless: Yes
[01:43] <wgrant> StevenK has it fixed.
[01:43] <StevenK> "Fixed"
[01:43] <lifeless> its fixed? Can close ?
[01:43] <wgrant> ... in a branch
[01:43] <StevenK> lifeless: It's in progress.
[01:43] <StevenK> Assign to me and mark it so if you wish, I'm working on it this week.
[01:50] <lifeless> done
[02:24] <wgrant> Oh
[02:25] <wgrant> Awesome
[02:25] <wgrant> We're still using YUI 3.0.0's cssgrids
[02:25] <wgrant> Rather than 3.3's.
[02:25] <wgrant> Deliberately.
[02:25] <wgrant> I wonder why
[02:55] <wgrant> jelmer: bzr daily builds have been failing for a while. Looks like 04_serve_address is in bzr.dev, so it can be dropped from the packaging branch?
[02:55] <poolie> hi wgrant
[02:55] <poolie> bit later even for jelmer in cet, i think
[02:55] <poolie>  //hope
[02:56] <wgrant> Hi poolie
[02:57] <wgrant> I hope it's a bit late, yes :)
[02:57] <poolie> *late
[04:54] <wallyworld> wgrant: do you know, if i'm defining a new ws collection using export_as_webservice_collection, what version string do i use for export_as_webservice_entry and export method operation_for_version in order for it to all work?
[04:55] <wallyworld> atm, wadl generation fails because the collection adaptor generated by the ws infrastructure has no entry_schema defined
[04:55] <lifeless> wallyworld: devel
[04:56] <wallyworld> lifeless: tried that :-(
[04:56] <wallyworld> i double check though since i've tried a few things
[04:56] <wgrant> wallyworld: beta
[04:56] <wgrant> It has to be the earliest version
[04:56] <wallyworld> tried that too :-(
[04:56] <wgrant> diff?
[04:57] <wallyworld> one sec
[04:58] <wallyworld> wgrant: https://pastebin.canonical.com/64011/
[05:05] <wgrant> wallyworld: looking
[05:06] <wallyworld> wgrant: thanks. i need to rejig the web service stuff for services so that services can be exposed nicely via launchpadlib. hence i need a service collection which i didn't need before since i relied on traversal
[05:07] <wgrant> yep
[05:10] <bigjools> the LP api stuff is a lesson in how not to design an API, right from how it's coded to how it's presented
[05:10] <wgrant> wallyworld: Are you sure this is going to work at all, given the different types that can be returned?
[05:11] <wgrant> It'll work if you hardcode .services in launchpadlib
[05:11] <wgrant> But not if you use API methods on IServiceFactory
[05:12] <wallyworld> wgrant: the return types will all implement IService
[05:12] <wgrant> (saying lp.services.getByName('sharing') in launchpadlib will probably just return an IService, without the implementation-specific methods.
[05:13] <wallyworld> i've added .services to launchpadlib but it doesn't work without a collection being defined
[05:14] <wgrant> wallyworld: You'll need to do something like PillarSet
[05:14] <wgrant> Not PersonSet or BugSet.
[05:15] <wgrant> Because of the different types.
[05:15] <wallyworld> i'll look at that. does the PIllarSet pattern allow something like lp.services['sharing'].foo() to be used?
[05:15] <wgrant> That's exactly what it allows.
[05:16] <wallyworld> what's the collection name? 'pillars' is assume?
[05:16] <wgrant> (note that these are client-side *Set definitions, independent of the server ones)
[05:16] <wgrant> No collection.
[05:16] <lifeless> bigjools: well, it had a set of specific goals, which it reached.
[05:16] <wgrant> They're client side utter hideousness.
[05:16] <wgrant> But they're the only way to do this sensibly.
[05:16] <lifeless> bigjools: sadly, some things we consider very important weren't there as goals, metrics - nor deliverabels
[05:16] <wgrant> wallyworld: Can't get past this:
[05:17] <wgrant> LocationError: (<lazr.restful.tales.WadlServiceRootResourceAPI object at 0xfda208c>, 'top_level_resources')
[05:17] <wgrant> wallyworld: Even after removing the ServicesLink
[05:17] <bigjools> lifeless: it's what happens when you leave someone alone to do something important
[05:17] <wallyworld> wgrant: that's exactly my problem, and i too removed the link
[05:17] <wgrant> Ah
[05:17] <wgrant> I thought you'd got past that
[05:17] <wgrant> So I will dig more
[05:17] <bigjools> lifeless: it's just crap on so many levels I despair
[05:17] <wallyworld> wgrant: so would i be wrong is assuming we cannot defined a new collection atm?
[05:17] <wgrant> It's pretty elegant, pretty and nice.
[05:17] <wgrant> It's just completely ineffective at anything ata ll :)
[05:18] <lifeless> bigjools: nah, it wasn't because it was one person; it was because of fundamental approaches - like the choice to expose internal model objects
[05:18] <lifeless> bigjools: which was, AIUI, mandated
[05:18] <lifeless> anyhow
[05:18] <lifeless> we have it now
[05:18] <lifeless> and need to migrate gracefully
[05:18] <wgrant> wallyworld: We can define a new collection. And lp.services.getByName('sharing') will work. But the object you get back will have no methods.
[05:18] <wgrant> wallyworld: With the client-side hack, lp.services['sharing'] will work and have methods.
[05:19] <wallyworld> bigjools: it's one of the reasons i did the services stuff - to try and keep internal model things hidden
[05:19] <wallyworld> wgrant: client-side hack = pillarset?
[05:19] <wgrant> I am wondering if the pragmatic approach may be to register all the services as top-level entries
[05:19] <wgrant> wallyworld: Yes
[05:20] <bigjools> wallyworld: fuck yes
[05:20] <bigjools> lifeless: well I am sure that was the case but there's other human factors involved which I don't want to discuss on a public channel
[05:21] <wallyworld> bigjools: note though that it does use the restful infrastructure so there are some concessions
[05:21] <bigjools> lifeless: anyway I'd love to see us migrating to something else.  I doubt we'll find the resources though :(
[05:21] <bigjools> wallyworld: restful is fine if used correctly
[05:22] <wgrant> Mmm
[05:22] <wallyworld> wgrant: not sure about exposing all services as top level entities
[05:22] <wgrant> It's not clear what "correctly" is
[05:22] <wgrant> For our needs, correctly RESTful is difficult.
[05:23] <wallyworld> wgrant: services aside, i still wonder why defining a new simple collection of entities didn't work for me
[05:23] <wgrant> wallyworld: It shouldn't fail to build, and I'm trying to work out why it is.
[05:23] <wgrant> But it also won't be useful once it does build.
[05:24] <wallyworld> wgrant: is that because it checks the ws.op client side and complains if it doesn;t think there's a server side end point to handle it?
[05:24] <wgrant> wallyworld: I believe so.
[05:24] <wgrant> It will respect the collection's resource type
[05:24] <wallyworld> well, what it believes it to be
[05:25] <wgrant> What you declared it to be :)
[05:25] <wallyworld> so it's static
[05:26] <wgrant> Basically.
[05:26] <wgrant> You have to explicitly downcast.
[05:26] <wgrant> By saying lp.load('someuri')
[05:26] <wallyworld> which i'm trying to hide from the user
[05:27] <wgrant> And it's not possible with the current implementation.
[05:27] <wgrant> Unless you do something like PillarSet
[05:27] <wgrant> Which implements client-side URL generation
[05:27] <wgrant> Which it then spits into lp.load directly.
[05:27] <wallyworld> so i wonder if it's worth doing this then. i guess so to make it user friendly
[05:34] <wgrant> wallyworld: Oh, the error message was obvious all along.
[05:34] <wallyworld> i didn't know how to fix it though
[05:34] <wallyworld> or why the entry_resource was None
[05:35] <wallyworld> which was the root cause
[05:35] <wgrant> You are truly ignorant of the world's cultures. "LocationError: (<lazr.restful.tales.WadlServiceRootResourceAPI object at 0xfda208c>, 'top_level_resources')" is TALESlish for "IService isn't imported by lp.registry.interfaces.webservice"
[05:35] <wgrant> Everyone should know that.
[05:35] <wgrant> (I suspect it's hiding an AttributeError or KeyError under that LocationError, as TALES is wont to do)
[05:36] <wallyworld> it wasn't before either, but i guess adding a collection made it matter
[05:36] <wgrant> It wasn't involved in the root before.
[05:37] <wgrant> I suspect only the root relies on the webservice registrations without anything else.
[05:37] <wgrant> Also, fuck TAES.
[05:37] <wgrant> TALES
[05:38] <wallyworld> wgrant: right, will try that. thanks for looking. i wasted too much time on that :-(
[06:13] <bigjools> lifeless: is there any support in testtools for re-running tests under different setup conditions?
[06:20] <wgrant> bigjools: scenarios
[06:20] <wgrant> eg lib/lp/poppy/tests/test_poppy.py
[06:21] <bigjools> I knew someone would say that
[06:21] <wgrant> Although that uses bzrlib's, not testscenarios
[06:22] <bigjools> there's a clone_test_with_new_id thing, but no explanation of how to use it
[06:22] <wallyworld> wgrant: turns out i don't need to do any client side hacking - it all just works without
[06:24] <wallyworld> ah, it depends
[06:24] <wallyworld> launchpad.services['sharing'].foo() works
[06:24] <wallyworld> launchpad.services('sharing').foo() doesn't
[06:25] <wallyworld> that's pretty sad
[06:25] <wgrant> Why would services('sharing') work?
[06:28] <wallyworld> wgrant: it doesn't since it checks that the method exists and it doesn;t as far as the client knows
[06:28] <wallyworld> but why does services['sharing'] work
[06:28] <wallyworld> it must not do the same client side checks
[06:28] <lifeless> bigjools: testscenarios
[06:29] <lifeless> bigjools: (python-testscenarios)
[06:29] <bigjools> lifeless: any online docs?
[06:29] <lifeless> bigjools: what test-poppy is using is an earlier edition of that
[06:29] <lifeless> http://pypi.python.org/pypi/testscenarios
[06:30] <bigjools> thanks
[06:32] <lifeless> bigjools: obviously if you have q's I'll be happy to answer
[06:32] <bigjools> lifeless: doc seems good so far thanks!
[06:43] <bigjools> lifeless: ok question: the scenarios list isn't explained very well, what is supposed to be in it?
[06:43] <lifeless> a list of (name, dict-of-things-to-apply) tuples
[06:43] <lifeless> e.g. ...     test.scenarios = [
[06:43] <lifeless> ...         ('scenario_1_0', {}),
[06:43] <lifeless> ...         ('scenario_1_1', {})]
[06:43] <lifeless> the dict maps attribute names to values
[06:43] <lifeless> e.g.
[06:44] <bigjools> ,lifelessall,
[06:44] <bigjools> grear
[06:44] <lifeless> {'foo': 'bar'}
[06:44] <bigjools> lifeless: apply to what?
[06:44] <lifeless> will make self.foo be 'bar' once the test is setUp
[06:44] <bigjools> ok
[06:45] <lifeless> see the dynamic scenarios example
[06:45] <lifeless> that makes two scenarios, one that sets self.hash=md5 and one that sets self.hash=sha1
[06:45] <bigjools> right
[06:46] <wallyworld> wgrant: so setting collection_of=None and forcing it to lookup what the resource entry provides seems to do the trick. but a trap that [] and () both return service resources which behave differently
[06:46] <wgrant> wallyworld: () isn't documented and really shouldn't work at all
[06:46] <wgrant> I don't know why it does
[06:47] <wgrant> I'm surprised collection_of=None works
[06:47] <wgrant> Wait.
[06:47] <wgrant> collection_of=None where?
[06:47] <wallyworld> i'll keep using [] in my test code and at least launchpadlib will work in both case
[06:47] <wallyworld> in the ServiceSet class
[06:47] <wgrant> Oh
[06:47] <wgrant> I thought you were doing this without the client-side hack :)
[06:47] <wgrant> 16:22:38 < wallyworld> wgrant: turns out i don't need to do any client side hacking - it all just works without
[06:47] <wallyworld> i am
[06:47] <wgrant> confuse
[06:48] <wgrant> d
[06:48] <wallyworld> but i need to define a client side set
[06:48] <wallyworld> but only the one - not one for sharing, one for ...
[06:48] <wgrant> That's the client-side hacking we wanted to avoid :)
[06:48] <wallyworld> there's also BugSet too etc
[06:48] <wgrant> Since it requires a client upgrade, which is less than ideal. But it's probably unavoidable.
[06:48] <wgrant> Sure.
[06:49] <wgrant> Precedent doesn't make it less nauseating.
[06:49] <wallyworld> so i thought that having a ServiceSet was kosher (like BugSet etc). and that avoiding SHaringServiceSet, FooServiceSet like was done for pillars was not using any hacks
[06:50] <wgrant> It's accepted, but still evil since it means we can't evolve the webservice without client changes.
[06:50] <wgrant> Which sort of destroys the entire purpose of WADL
[06:50] <wallyworld> yes. i didn;t think we could anyway
[06:51] <wgrant> Hm?
[06:51] <wgrant> As we saw before, you can add new types, methods, top-level entries, top-level collections without changing the client.
[06:51] <wgrant> But not this sort of top-level collection
[06:51] <wallyworld> given our current implementation (ie BugSet, XXXSet all defined in the client side lib) i thought we needed to make that compromise
[06:51] <wgrant> 'all'
[06:51] <wgrant> Aren't there only 3 of them?
[06:52] <wallyworld> Bug, Pillar, Product, Person, Distribution etc
[06:52] <wgrant> Those are only needed because we wanted foos['somefoo'] to work
[06:52] <wgrant> Collections with normal methods don't need one of those client-side hacks.
[06:53] <wallyworld> so it's really a limitation of our infrastructure
[06:53] <wallyworld> since all the client side classes do is define _get_url_from_id
[06:53] <wallyworld> and that could be put in the wadl
[06:53] <wallyworld> as an attribute
[06:53] <wgrant> In this case we want services['someservice'] to work, partly because due to lazr.restfulclient limitations the ServiceFactory's methods will only return objects with IService's methods
[06:53] <wgrant> Yes.
[06:53] <lifeless> there is a bug
[06:53] <lifeless> about allowing arbitrary interfaces on each api object
[06:54] <lifeless> rather than predicting the interface for collection elements
[06:54] <wgrant> But in this particular case we only want that workaround to get that functionality to workaround another limitation
[06:54] <wgrant> lifeless: Right, that would work too
[06:54] <wallyworld> so for now i'll do a new version of launchpadlib
[08:00] <adeuring> good morning
[08:10] <lifeless> bigjools: it making more sense now?
[08:11] <bigjools> lifeless: yes thanks - rvba is on it :)
[08:11] <rvba> Hi lifeless.
[08:12] <czajkowski> good morning
[08:16] <lifeless> cool
[08:19] <rvba> lifeless: was this about the testscenarios thingy?
[08:27] <lifeless> yah
[08:32] <rvba> lifeless: I've been bitten by 872887.  Any advice on how to use testscenarios with nose?
[08:38] <lifeless> rvba: use load_tests with nose2
[08:38] <lifeless> rvba: or don't use nose, its terrifying
[08:39] <lifeless> rvba: or figure out how to make nose do a custom callback before test execution, it probably has a hook somewhere for that, it just won't be compatible with anything else
[08:43] <rvba> lifeless: ok, I'll try to do that thanks.  (too late, we're already using nose extensively.  It's worked fine so far to easily integrate django tests, twisted tests, etc….  But maybe it's terrifying inside ;) )
[08:48] <lifeless> rvba: it is; are you using nose's 'twisted' thing, or testtool's twisted async module ?
[08:49] <lifeless> rvba: (it is terrifying inside)
[08:49]  * lifeless *far* preferrs using testtools.run / subunit.run to nose.
[08:50] <rvba> lifeless: testtool's
[08:51] <lifeless> rvba: phew :)(
[08:51] <lifeless> s/(//
[08:51] <rvba> testtools*
[09:02] <rvba> lifeless: fwiw load_tests (module level function) is called without any argument by nose.
[09:03] <lifeless> yay, totally incompatible
[09:04] <rvba> indeed.
[09:05] <rvba> I guess I'll have to resort to nose-specific hooks.
[09:05]  * rvba starts to hate nose.
[09:05] <lifeless> http://pypi.python.org/pypi/discover - see load_tests on that page
[09:05] <lifeless> rvba: welcome to my world
[09:06] <rvba> I guess nose stinks :)
[09:12] <rvba> lifeless: in fact, nose is simply treating load_tests as a module level test function.
[09:14] <lifeless> yup
[10:05] <rvba> jam: Hi (I'm from the Launchpad team). I'm struggling quite a bit trying to get nose working with testscenarios and I see that you've been trying to do that as well (https://bugs.launchpad.net/testscenarios/+bug/872887). Do you happen to remember what you ended up doing to generate the scenarios?
[10:05] <_mup_> Bug #872887: TestwithScenarios incompatible with nose 1.1.2 <testscenarios:Invalid> < https://launchpad.net/bugs/872887 >
[10:24] <cjwatson> argh doctests with sampledata.  hate hate hate
[10:24] <cjwatson> things I do not like include reading current-dev.sql to discover exactly what should be guaranteed in a given test
[10:26] <cjwatson> also, the "bob the builder" joke in the test suite gets very old after (a) you've read it a few hundred times (b) your child watches enough of it that you get the theme tune in your head every time you see it
[10:27] <lifeless> cjwatson: current-dev.sql has bad data in it
[10:29] <cjwatson> indeed, but I'm not quite sure of your point :)
[10:30] <lifeless> whats guaranteed in a test isn't well demonstrated by current.sql
[10:30] <lifeless> (and current-dev.sql isn't used at all for tests ;))
[10:31] <cjwatson> uh, current, ok.  but I meant doctests that are basically pretty-printing objects straight out of the sampledata.
[10:31] <lifeless> okies
[10:31] <lifeless> kill crush destroy
[10:32] <cjwatson> quite.  need to make this branch pass for now, though :)
[10:34] <wgrant> Is this webservice doctests for build.builder?
[10:34] <cjwatson> Yes
[10:34] <cjwatson> I've pushed a fix
[10:37] <cjwatson> http://bazaar.launchpad.net/~cjwatson/launchpad/api-build-builder/revision/15073 is no more evil than the crap around it, I think
[10:54] <StevenK> cjwatson: A few hundred, you say? I was sighing about it after the tenth time, and I have no young child. :-)
[10:55] <StevenK> I don't know whether to blame Julian or Celso for that particular piece of Soyuz.
[10:58] <cjwatson> you sure it's not a Daniel thing?
[10:58] <wgrant> I believe it was Daniel
[10:58] <cjwatson> most of the puns are his fault
[10:58] <StevenK> Oh.
[10:59] <StevenK> Is he still in Melbourne?
[10:59] <StevenK> I have a few ... debts to settle.
[10:59] <cjwatson> Silverstone, not Stone
[10:59] <StevenK> Oh, bah.
[10:59] <cjwatson> AFAIK he was never in Melbourne
[10:59] <cjwatson> arguably transitively my fault for feeding him salami while he wrote chunks of Soyuz at my house, I guess
[10:59] <StevenK> Daniel Stone was, though.
[11:17] <jam> rvba: basically, I stopped using nose w/ testscenarios...
[11:17] <jam> Specifically, nose doesn't seem to support the python 2.6+ test feature of "load_tests"
[11:18] <jam> if you look here: http://bazaar.launchpad.net/~jameinel/u1db/c-oauth/view/head:/u1db/tests/__init__.py#L304
[11:19] <jam> That is the adapter function I wrote, which allows you to do: "from ... import load_with_scenarios as load_tests
[11:19] <jam> and then python 2.6/7 unittest and testtools itself
[11:19] <jam> will load the tests in your module and parameterize them with testscenarios
[11:19] <jam> nose doesn't support having "load_tests" defining how to extract tests cases from a module
[11:20] <jam> and I never figured out how nose does that sort of thing
[11:21] <rvba> jam: thanks.  I've been trying to use nose-specific stuff to generate the scenarios but no luck so far…
[11:22] <jam> rvba: testscenarios lets you do the parameterization by either inheriting from its TestCase or by using a load-time hook
[11:22] <jam> I tried the test case approach, but it was broken for a lot of cases
[11:22] <jam> a lot of runners, I should say
[11:23] <jam> specifically, there are ones that assume the number of tests that will be *run* with one call to .run() is always going to be 1
[11:23] <jam> but the test-case based approach creates them on-the-fly
[11:23] <jam> so I recommend going with the load-time version
[11:23] <jam> but I don't know how to get nose to not try and load your tests normally, and only accept them through your loader
[11:23] <rvba> Yeah, but an assertion in nose makes that approach impossible to use with nose.
[11:23] <jam> rvba: exactly
[11:24] <rvba> I even tried to monkey patch nose to remove that assertion but then there is something wrong with how the tests are run.
[11:27] <rvba> jam: anyway, thanks for sharing the result of your experiments.  I'll try again for a few hours and I guess I'll not use testscenarios if I can't find a proper way to use it with nose.
[11:27] <rick_h> rvba: have you tried to file a bug/hit up the mailing list? I know Jason's been working on putting out some nose2 releases. Helpful guy.
[11:28] <jam> rvba: yeah, I didn't need much from a test runner. I ended up writing a plugin to hook into bzr's test infrastructure, as it is the best I've found yet :)
[11:28] <rvba> rick_h: I haven't tried that.  I'll look into it thanks.
[11:28] <jam> (partial loading, progress bars, regex matching, etc, etc.)
[11:35] <lifeless> jam: the only runner I know that assumes one TestCase == 1 test is nose
[11:35] <lifeless> jam: everything else i"ve see, however awful, honours the protocol
[11:36] <jam> lifeless: sure, though everything else is subtle shades of broken in different ways :)
[11:36] <lifeless> jam: I'd love bug reports; I commented on all your current ones I think
[11:36] <jam> lifeless: yeah, its mostly problems with the actual runners
[11:36]  * lifeless goes back to bed.
[11:36] <jam> like not great support for --verbose, etc
[11:38] <rick_h> I love the nose --with-id
[11:38] <rick_h> use that one all the time
[12:28] <jml> hey
[12:29] <jml> I've seen a fair bit of chatter about testtools & friends over the last couple of days
[12:29] <jml> I haven't followed it all closely, but I'd like to know: how can I help?
[12:45] <wallyworld> cjwatson: i've merged your branch directly since the fixes you did were just test fixes so you can update locally and your changes will be there
[12:51] <cjwatson> wallyworld: excellent, thanks
[12:51] <wallyworld> np
[12:52] <cjwatson> jtv: if my changes to https://code.launchpad.net/~cjwatson/launchpad/remove-query-distro-pending-suites/+merge/101174 meet with your approval, do you think you could land that for me?
[12:53] <jtv> cjwatson: I'll have a look.
[12:59] <deryck> Morning, all.
[13:00] <rick_h> morning
[13:14] <jtv> cjwatson: I know this is terrible but I don't even know what the state of the landing machinery in LP is.  Is just setting the MP to Approved enough now?  If not, you may need to get help from someone who's actively on LP duty for the landing.  My setup isn't in a usable state.
[13:17] <StevenK> jtv: Tossing at ec2 for cjwatson and you.
[13:17] <jtv> Thanks!
[13:17] <jtv> And those drop bears are sugar-free by the way.
[13:17] <StevenK> Haha
[13:17] <jtv> Good to see code shrinking into something better, no?
[13:19] <cjwatson> jtv: ah, I didn't realise you weren't actively on LP at the moment
[13:19] <cjwatson> StevenK: thanks
[13:26] <czajkowski> StevenK: herrrro
[13:29] <StevenK> czajkowski: O hai
[13:30] <StevenK> cjwatson: I've marked it no-qa, you didn't have a bug linked, but feel free to do some QA on DF when it lands.
[13:31] <cjwatson> I didn't really think there was much plausible QA, as if it broke anything it should have failed tests
[13:31] <cjwatson> but I can run the publisher through on DF if you like, I guess
[13:31] <StevenK> cjwatson: If you're happy with no QA, then it's fine.
[13:32] <cjwatson> cool
[13:46] <rick_h> adeuring: let me know what symlink/js file there you have out of whack.
[13:46] <rick_h> the file I think you're looking at should be in build/lp/app/languages.js
[13:46] <rick_h> sorry, build/js/lp
[13:47] <adeuring> rick_h: no, its build/js/lp/app/worlddata
[13:47] <sinzui> jcsackett, I will be afk for about 75 minute because I am picking up my computer.
[13:48] <rick_h> adeuring: so that used to be a symlink to the worlddata directory, but the launguages.js was moved into app
[13:48] <adeuring> rick_h: OTP
[13:48] <rick_h> adeuring: ok
[13:54] <StevenK> rick_h: Oh, bah.
[13:54] <jcsackett>  sinzui: ack.
[13:55] <rick_h> StevenK: huh?
[13:55] <rick_h> StevenK: heard back from sidnei yesterday so we've got to redo the meeting. Should we just try again for next week? Any day work best for you since you're the late one?
[13:56] <StevenK> rick_h: The symlinks we craft in combo-rootdir
[13:56] <rick_h> StevenK: I didn't think we did any symlinks any more
[13:56] <rick_h> StevenK: I was pretty sure I removed all those
[13:57] <rick_h> StevenK: yea, yui is the only symlink any more
[13:57] <StevenK> Oh, neat.
[13:57] <StevenK> rick_h: Any day is fine with me.
[13:57] <rick_h> StevenK: ok, will get another email out today.
[13:57] <rick_h> StevenK: yea, that's the bug/issue, adeuring has a symlink for some reason
[13:58] <bac> hi czajkowski
[13:59] <czajkowski> bac: howdy
[13:59] <czajkowski> bac: skype/G+ ?
[14:09] <jml> hello
[14:10] <jml> I've just uploaded fixes for the failing tests in my branch, could someone please attempt to land it?
[14:13] <jml> is no one around?
[14:24] <rick_h> jml: I'll try to pull that down and land it again. thanks for updating
[14:24] <adeuring> rick_h: I removed the bad symlink build/js/lp/app/worlddata and now "make jsbuild" ends with IOError: [Errno 2] No such file or directory: 'build/js/lp/app/worlddata'
[14:26] <jml> rick_h: thanks.
[14:26] <rick_h> adeuring: do you have the traceback from that IOError?
[14:27] <adeuring> rick_h: http://paste.ubuntu.com/923374/
[14:27] <adeuring> rick_h: actually, the _is_ a symlink: ls -l build/js/lp/app/worlddata
[14:27] <adeuring> lrwxrwxrwx 1 abel abel 41 2012-01-02 10:02 build/js/lp/app/worlddata -> ../../../lp/services/worlddata/javascript
[14:28] <rick_h> adeuring: rm -rf you whole build dir please and then run make clean make
[14:30] <adeuring> rick_h: same as before. BTW, the date of the new symlink is odd: 10:02, but my local time is 16:30
[14:30] <adeuring> rick_h: well, the "creation date" is 2012-01-02...
[14:31] <rick_h> adeuring: so the build dir got recreated but the symlink is still ther?
[14:31] <adeuring> rick_h: yes...
[14:31] <rick_h> is there a build/js/lp/app/languages.js file and -min?
[14:31] <rick_h> both with current modifeid dates on them?
[14:32] <rick_h> adeuring: can you dbl check your bin/combo-rootdir script? http://paste.mitechie.com/show/610/
[14:32] <rick_h> adeuring: that is what used to create the symlinks
[14:33] <adeuring> rick_h: that's what I have. "diff" output is empty
[14:35] <adeuring> rick_h: ahhh....  there is this bad symlink already in lib/lp/app/javascript
[14:36] <rick_h> adeuring: ah, that would explain it
[14:36] <rick_h> adeuring: yea, there should be no symlinks in there
[14:36] <rick_h> adeuring: and the build script copies the files out of there and minimizes them in the build location
[14:37] <adeuring> rick_h: I removed it; "make jsbuild" now works
[14:37] <rick_h> adeuring: awesome!
[14:37] <rick_h> adeuring: I guess at some point that symlink was there and we didn't explicitly cleanup/remove it
[14:38] <rick_h> I've had to redo my devel/etc so many times didn't hit it
[14:38] <adeuring> rick_h: seems so.
[14:39] <rick_h> jml: ok, up to the ec2 gods now
[14:41] <jml> rick_h: thanks.
[16:13] <jcsackett> sinzui: got time for a quick chat? just need to clear up a few points.
[16:13] <sinzui> okay
[18:33] <timrc> question: do I programatically add a comment to a bug via newMessage()? Something about the use of the word "message" and not "comment" makes me nervous, here
[18:42] <cjwatson> timrc: yes
[18:43] <timrc> cjwatson, perfect, thanks
[18:55] <cjwatson> hey, if somebody wants to review https://code.launchpad.net/~cjwatson/launchpad/remove-services-unicode-csv/+merge/101315 for me, I can test my shiny new landing access
[19:55] <lifeless> gary_poster: so, testtools and subunit
[19:55] <gary_poster> lifeless, good call thanks
[19:55] <lifeless> hum
[19:55] <lifeless> subunit has the idea that tag changes happen at one of two places
[19:55] <lifeless> between tests
[19:56] <lifeless> and for one test
[19:56] <lifeless> changes that happen between tests are applied to all subsequent tests
[19:56] <lifeless> changes that happen for one test are not
[19:56] <lifeless> testtools should be broadly compatible with that, if its not, its an unintended incompatability
[19:58] <lifeless> I think testtools TestResult not being per-test aware is probably a naivety bug
[19:58] <lifeless> rather than intention
[20:00] <gary_poster> lifeless, cool.  We might or might not clarify that in testtools in a patch then.  thanks!
[20:08] <lifeless> de nada
[20:08] <lifeless> flacoste: you around today?
[20:08] <flacoste> lifeless: i am, but booked wall-to-wall with calls
[20:15] <lifeless> no worries
[22:18] <StevenK> sinzui: http://pastebin.ubuntu.com/924059/
[22:36] <sinzui> StevenK, Your approach is right. We just need to make the simpleterms to ensure we get the right value, token, and title: here are examples: http://pastebin.ubuntu.com/924071/
[22:44] <sinzui> wallyworld, I see my comment is still in lazr.restful and that the code is guessing top-level collections. The code recovers from exceptions: http://pastebin.ubuntu.com/924082/
[22:51] <sinzui> wallyworld, https://launchpad.net/moovida
[22:57] <sinzui> wallyworld, http://people.canonical.com/~curtis/disclosure/
[23:44] <rick_h> woot, yui 3.5 is official http://www.yuiblog.com/blog/2012/04/10/announcing-yui-3-5-0/