/srv/irclogs.ubuntu.com/2011/11/21/#bzr.txt

spivpoolie: I do get the sense that either the subunit protocol or the implementation of it has awful failure modes00:01
poolieyeah basicalyl that00:01
wgz...I just realised I tyoped 'Pageant' in the thread title on the bazaar list00:01
pooliejelmer, i'm getting a failure in00:01
poolieERROR: bzrlib.tests.per_tree.test_inv.TestInventory.test_canonical_invalid_child(GitWorkingTreeFormat)00:01
pooliewith tip of bzr-git00:02
pooliedo you want me to report it?00:02
poolie(other than on irc :)00:02
spivpoolie: I suppose if you were to design a protocol to be reasonably robust about failing well in the case of corrupted/interleaved output you'd want somethign like "length-prefixed chunks with some sort of redundant check bytes on the prefix"00:02
pooliei think it is in a bit of an uncanny valley between "tolerates random insertion and modification and picks out what structure it can" and "binary protocol must be passed byte-for-byte"00:03
pooliesome parts are one and some the other00:03
poolieand in failure modes you get kind of the worst of both worlds00:03
spivOr even just a chunk sequence number (which would mitigate against being interleaved with another valid subunit stream, if that's a realistic concern?)00:03
jelmerpoolie: there's still about 500 failures like that in bzr-git, because roundtripping and various other bits aren't complete00:04
jelmerpoolie: so you're welcome to file a bugreport, but I should get to that issue eventually without one too00:04
spivUgh, yes, that sounds like a taking all the downsides of Postel's Law without many of the upsides!00:04
jelmerpoolie: for bzr-svn it's different, if you see failures like this with that then I'm very interested in bug reports00:05
pooliespiv yeah it is inconsistently liberal00:05
pooliejelmer, ok, i was a bit overoptimistic and thought i'd run my tests without bzr-git skipped00:06
wgzit's basically impossible to write good ctypes code00:27
wgzI try a different style every time I need to do something, and have never come across one I like.00:27
=== glyph_ is now known as glyph
thomi|workwgz: I just tried that debug version of pageant, and it fixes the issue. Are you interested in it's output at all? Any chance you could provide a version that doesn't show the debug info?01:28
pooliehi thomi|work01:40
thomi|workhi poolie01:40
Noldorinpoolie, well, any thoughts?03:19
poolieNoldorin, i have many thoughts03:24
pooliebut if you asked a question, i didn't see it03:24
Noldorinpoolie, heh yes, i'm sure you do. i did. should have your name highlighted above :-)03:35
Noldorinif you have a log...03:35
poolieoh about download types?03:39
poolieoh i didn't realize that was you, hi03:39
Noldorinno prob, hi :-)03:39
poolieso, let's see03:41
poolieactually, let's go to #launchpad-dev?03:41
poolieNoldorin, anyhow04:04
pooliethere are two things i can think of to do first04:04
poolieone is help you get lp running locally04:04
pooliethe other is to talk about how this change could be put in04:04
Noldorinpoolie, sorry, we can go there if you like04:05
vilahi all !07:30
fullermdGeez, that's cheerful.  Must be post-coffee...07:30
vila:)07:33
pooliehi vila07:34
mgzmorning!08:58
vilamgz: hey ! otp right now, but I'd be happy to discuss bug #892992 later09:12
ubot5Launchpad bug 892992 in Bazaar "bzrlib.tests.test_config.TestStackCrossSectionsExpand.test_cross_related_sections failure" [High,Confirmed] https://launchpad.net/bugs/89299209:12
mgzvila: yeah, just saw that in bugmail09:17
poolieo/ mgz09:23
poolievila, so bzr remerge is a bit dangerous09:25
* vila nods09:25
poolieperhaps it should default to only doing conflicted files09:25
poolieor maybe only named files09:25
vilayup09:25
vilaI think it didn't because we have cases where the same file where involved in several conflicts or some conflicts may be related and soring them out was hard09:26
vilaafaik, I've fixed all cases where the same file were involved in several conflicts so it may be possible to be do it right now09:27
pooliehm09:27
poolieso that could be done separately, and probably should be09:27
vilaotherwise, that will be a limitation requiring that all other conflicts (not .po related) should resolved first09:27
poolieok09:30
poolieso that sounds pretty good09:30
poolieyou perhaps should explain in more detail on the bug how the proposed fix will work09:30
poolieso slangasek is clear09:31
vilayup09:32
pooliehm09:34
pooliethe other thing we really need which i have saliently failed to do yet09:34
poolieis a restfulclient update09:34
poolieevery time lp does a fastdowntime it bumps the importer09:35
pooliemostly avoidably09:35
vilaright, I've recorded the corresponding failures so far.09:35
vilaSome are related to restfulclient, but not all.09:36
vilaSo having a way to list/remove them still sounds like a good idea, you could get the restfulclient ones from that09:37
pooliewhat do you mean?09:38
poolievila, i would love if bzr gardner worked in a colo09:39
vilait should and will ;)09:40
vilaerr, it probably doesn't yet is what I meant09:40
pooliei understand09:41
pooliehi mgz, how's it going?10:02
mgzhey poolie, well.10:07
pooliei was going to chat with you but it's getting pretty late10:08
mgzwe didn't settle an exact time to move our 1-1 to I don't think, maybe we should do that at least now10:09
pooliemgz, vila, jelmer, i was wondering the other day what to do at the rally10:34
pooliemaybe bfbia10:34
pooliemaybe showing more branch content in the lp ui10:34
pooliemaybe we should also have a more specifically bzr focussed event10:34
mgzI thought it'd be a good chance to look at some of the udd workflow/quilt things10:35
poolieoh, yeah, that would be a really nice thing to work on too10:35
poolieespecially with all the platform people10:35
vila+1 on reserving at least part of the event to be bzr-focused10:36
mgznow I've worked out what bfbia is, that's also what you were saying :)10:36
pooliemm10:36
pooliethat's a bit more specific10:36
vilaotherwise, getting launchpad running in an lxc container whould be very helpful to help debug the importer10:36
pooliemm10:37
pooliedoes it have to be lxc?10:37
poolieit's pretty trivial to get it going in a schroot10:37
poolieyou know schroots :)10:37
poolieand you avoid some amount of lxc flakiness10:37
vilaright, but lp declares a bunch a specific hosts too10:37
vilaand not polluting the host (as opposed to guest, gee synonyms) will make it easier to manage10:42
pooliehm?10:55
poolieyou're talking about putting them into /etc/hosts?10:55
poolieyou could run the udd importer from a separate schroot10:56
pooliethen the real host won't need to know the name of anything10:56
* vila blinks10:58
vilaI should know that /etc/hosts is part of the chroot don't I ?10:58
mgzah, I missed thomi|work after I went to bed last night11:34
mgzthomi|work: I am a little interested in the output, and have forwarded the fix upstream (other changes on trunk may also have avoided the bug for you)11:35
mgzI'll put up a build without the debug output later, but hopefully putty will do a new release relatively soon too11:37
jelmermgz: wrt our discussion yesterday, would it perhaps make sense to make the iter_revisions / iter_files_bytes HPSS calls take a compression ("bz2", "zlib") argument?12:05
spivjelmer: sounds ok to me (although I'd be a touch concerned about the load that might add to a server)12:07
jelmerhi spiv12:08
jelmerspiv: do you know why get_parent_map uses bz2 rather than anything else?12:08
spivjelmer: in the most ideal of worlds the server would be able to send that those records directly from the repository's internal storage format already compressed without needing to do any processing at all12:09
jelmerspiv: ah, I see12:09
spiv(perhaps not for iter_files_bytes, but iter_revisions in principle should just be sending a record stream)12:09
spivjelmer: get_parent_map uses bz2 because that's what lifeless chose to make it do :)12:09
spivjelmer: so ask him :)12:10
jelmerspiv: will do, thanks :)12:10
spiv(I suspect the answer is something like: that for the relatively small amounts of data involved the CPU load on the server probably isn't a big deal vs the savings in round-trips and thus making the server repeat work re-reading indices)12:11
spivBut lifeless being lifeless I expect he measured :)12:11
spivjelmer: hmm12:12
mgzspiv: that ideal is the same I was wishing after last night :)12:12
spivjelmer: so iter_files_bytes could also be built on record streams12:12
jelmerspiv: the server side implementation already relies on get_record_stream12:12
spivjelmer: and the record stream APIs already have a way to express “hey I'd prefer stuff optimised for repo format X”12:12
spivjelmer: but the limitation you'll need to work around is that at the moment the queries to generate record streams aren't very flexible:12:13
mgzI'm reasonable sure bz2 was smaller when it was added, but I'm curious how much that's still true, the cost is pretty high12:13
spivjelmer: it's easy to say “give me all revisions+inventories+texts+signatures+chks for {list of revisions, full ancestry of list of revisions}"12:14
spivjelmer: but atm it doesn't really provide for “no, really, I just want the full texts for everything in the tree of rev X”, for instance12:15
jelmermgz: hmm, yeah. I just used bzip2 for consistency (because get_parent_map uses it), but perhaps I should give it some more thought.12:15
spivjelmer: which is what my half-done (but working as a prototype) brHPSS for stacked branches branch helps fix.12:15
spivjelmer: or rather, that branch just adds a rather useful special case in a slightly hacky way12:16
spivjelmer: but the general idea of using record streams even more is a good approach I think12:17
spiv(That particular special case also sort-of addresses the “look up all the inventory and CHK pages server-side and just send me what I need” rather than making the client traverse the revision->inventory->chk pages->texts links)12:18
jelmerspiv: yeah, it would definitely be nice to have the server handle those lookups12:19
spivSo a problem with just providing an HPSS iter_files_bytes for lightweight checkouts that for large trees (i.e. many files, deep directories) it still requires the client to get full inventory (so finding all the chk pages), which currently needs umpteen round trips.12:20
spivIdeally you'd use something like the texts-for-rev hack that unlanded branch adds and use that12:20
jelmerspiv: your texts-for-rev branch was what got me into all of this :-)12:20
spivExcept we don't have great tools for consuming record streams apart from inserting them into an acutal repo12:21
spivAnd for the lightweight checkout case we'd be happy enough to just build the inventory object in memory, and then unpack the text records directly to the filesystem as we receive them12:21
spivBut the infrastructure to do that doesn't really exist yet AFAIK, although it's in principle possible.12:22
jelmerspiv: the lightweight checkout case is what I've been looking at so far - having a streaming Repository.iter_files_byes (done, but using bz2) and a working Repository.get_inventory should be sufficient for that afaict12:22
spiv(You could in the interim write the stream out to a temporary repo and delete it after the tree build)12:23
jelmer(checkout uses Repository.iter_files_bytes)12:23
spivWhat precisely is Repository.get_inventory going to send over the wire for CHK repos?12:23
spivPerhaps just a full inventory in the HPSS inventory-delta format?12:23
jelmerThat's a good question12:24
spivBecause sending just the 'inventory' record isn't going to do you much good :)12:24
jelmerright, the other alternative would be using .serializer.write_inventory_to_string12:24
spiv"Hi, have the name of the chk root page, kthxbye"12:24
jelmerbut that's going to use the old XML serializer which we want to get away from12:24
spivUgh, no12:24
spivThat also reinforces the rich-root and subtree watershed12:25
spivWhereas inventory-deltas are a touch nicer IIRC12:25
spivThere's also code to encode a full inventory as an inv delta (it's needed for some corner case I forget)12:26
spivs/also/already/12:26
spivSo I'd suggest reusing that.12:26
jelmerI'll have a look at that, thanks.12:26
spivAlso, it'll push you more in the direction of record streams :)12:26
spivWhich is really where we want to be, I think12:27
spivThey are intended to be an abstraction that works well both as an internal API and over the wire.12:27
jelmeryeah, they're quite reasonalbe12:28
jelmerthe Repository.iter_revisions / Repository.iter_files_bytes HPSS calls are both very much oriented towards record streams (don't return in a specified order, allow for absent records)12:28
spivSo I'd try to keep in mind that there are separate concerns:12:28
spiv1) How to deliver records over the wire: record streams.  2) How to efficiently ask the server which records to send for a given use case: case-by-case improvements needed :)12:29
spivIncidentally, I reckon if you finish my branch so that 'bzr branch --stacked HPSS_URL' becomes fast, it will be a great thing to recommend for many uses people currently use lightweight checkouts for12:31
spiv(Not all, but certainly some)12:32
spivI suspect there are folks that would rather have a real branch than a checkout, so long as they don't have to pay the full cost of all history (and having a bit more data cached locally, data that's actually relevant to making e.g. 'bzr diff' run fast, is also a plus)12:33
spivFolks that just want a really cheap readonly mirror of something that they want to be able to update to the current tip periodically will of course be better off with a lightweight checkout12:34
spivBut I know I'd love to be able to do e.g. 'bzr branch --stacked lp:gcc' and have it get me a usable branch in time and bandwidth not much more than the size of the eventual tree on disk.12:35
jelmerspiv: I can't agree more12:36
jelmervila: I'm getting build failures with sphinx on precise, have you seen those?12:39
jelmers/build/test/12:39
jelmerTypeError: expected string or Unicode object, NoneType found12:40
jelmerwhile trying to pickle something12:40
=== Quintasan_ is now known as Quintasan
mgzhm, I don't get bzr-builddeb bug mail.13:36
jelmermgz: you can subscribe :)13:39
mgzI'm used to mail magically appearing :)13:43
fullermdI certainly get mail all the time as if by supernatural agency.  But I'm pretty sure it's more of the infernal than divine sort...13:43
vilajelmer: meh, those will be... interesting, do you have more info ?14:02
vilajelmer: not seen on babune apparently, may be the dependencies are not installed there14:03
* vila tries to remember what bell is ringing...14:04
jelmervila: e.g. http://pastebin.ubuntu.com/745133/14:04
jelmervila: you were at the front door wondering why there was nobody there ? :)14:04
vilaLOL14:05
vilaI've never seen the bottom of this traceback but the top of it... well, sphinx internals have evolved so I'm not that surprised (a bit disappointed though :-/)14:06
vilasphinx or docutils14:06
vilahmm, and oneiric /usr/lib/pymodules/python2.7/sphinx/environment.py is different as line 250 doesn't match the one you're reporting for precise...14:09
jelmerI have 1.0.8+dfsg-214:10
vilaI have... no sphinx in my schroot precise ;)14:10
vilajelmer: where do you get that ? On your local setup or in some build env ?14:12
mgzis the OOM from commiting something small in repo with big files repacking related?14:16
jammgz: most likely14:19
jam"bzr commit" takes less memory than "bzr pack"14:19
jamthough bzr-2.4 should do better in that regard14:19
jam(lower peak during pack)14:19
jelmervila: this is on my local setup14:24
jammgz: I meant to mention it, but then deleted the email before responding :)14:24
jamjelmer: my comment was a basic comment about your hpss series of changes, not specific to one patch14:25
jamI might have just missed the testing14:25
vilajelmer: ok, file a bug then, we strictly support sphinx only for the host that generates doc.bazaar.canonical.com, but the plan is still to switch to sphinx... when time permits14:25
jamI wasn't looking super close, but I thought a few of them didn't have any changes in a test_* file.14:25
jelmerjam: All of them should be updated at least bzrlib.tests.test_smart *and* bzrlib.tests.test_remote. I'll double-check14:25
jelmer*updating14:25
GRiDhi14:49
=== yofel_ is now known as yofel
mgzhey GRiD14:56
vilajelmer: hmm, saying only doc.b.c.c is the only place where we care about sphinx may be over-optimistic, iirc, windows and osx installers build their own doc15:01
vilajelmer: filing a bug is even more the way to go15:01
jelmervila: will do15:12
jelmervila: looks like it's caused by lazy_regex15:28
* vila pulls his remaining hairs15:28
mgzehehe15:30
jelmerI'm submitting a patch to make lazy regex compiled expressions pickleable15:30
* fullermd makes a note to keep his head away from vila.15:30
* vila notes the backup plan15:30
mgzjelmer: just thunk on __reduce__ maybe?15:31
vilajelmer: won't it be simpler to delay importing the real 're' and just get rid of lazy regexp in this context ?15:34
mgzit's worth not making lazy regexprs blow up pickle anyway15:35
vilahmm, may be, but I don't think we use pickle anywhere close regexps in bzr otherwise, whatever is simpler is fine by me15:36
jelmermgz: re registers a custom type handler, so __reduce__ doesn't get called as far as I can tell15:40
mgzjelmer, just something like this isn't enough?15:44
mgzdef __reduce__(self): return (re.compile, (self.pattern,),)15:44
jelmermgz: hmm, that's a good point15:47
jelmermgz: I was looking at unpickling back to a lazy compiled regex, but that's not really necessary15:48
mgzin practice, return (_real_re_compile, self._regex_args) ...but need to fold in kwargs first15:48
* jelmer settles for __getstate__ / __setstate__ instead15:59
=== beuno is now known as beuno-lunch
=== luks_ is now known as luks
=== luks is now known as luks_
=== luks_ is now known as luks
=== beuno-lunch is now known as beuno
lifelessjelmer: pickle, really?18:18
mgzneed a break for food before finishing this off19:25
trashbird1240hello19:30
trashbird1240I accidentally pushed a branch to a repository root19:30
trashbird1240can I undo it somehow?19:30
trashbird1240(or have I not done anything harmful?)19:30
jelmerlifeless: I'm afraid so19:41
jelmertrashbird1240: you can remove the branch from that location by using "bzr rmbranch LOCATION"19:41
jelmerthat should keep the repository intact19:41
trashbird1240jelmer: okay, let me try it19:42
jelmerlifeless: (this was for the benefit of sphinx, not because I'm planning to use pickle myself)19:42
trashbird1240wait: is LOCATION a directory? url?  what is it?19:42
jelmertrashbird1240: local file path or url19:42
trashbird1240okay, so my branch (the one that I accidentally pushed ) is called "dynamics"19:43
trashbird1240do I go to the root of the repository and use "bzr rmbranch dynamics"?19:43
trashbird1240let me check the help...19:43
jelmertrashbird1240: presumably if you ran "bzr push FOO" you would now run "bzr rmbranch FOO"19:43
glyphtrashbird1240: branches aren't called things19:44
glyphtrashbird1240: they have URLs :)19:44
trashbird1240okay, bzr remove-branch gave me no output, so I presume it worked ;)19:44
trashbird1240I pushed to a local directory19:44
jelmertrashbird1240: if you run it again, it should tell you there is no branch to remove19:44
trashbird1240i.e. the repository is in /var/www/<place where my brancehs go>19:44
trashbird1240OK...19:44
trashbird1240bingo19:45
trashbird1240I got "not a branch"19:45
trashbird1240Thanks!19:45
glyphjelmer: so uh, if I do 'bzr branch . foo', is it going to treat the repository in the branch as a shared repository?19:46
glyph(assuming no shared repository exists above .)19:46
jelmerglyph: only if the repository in . is marked as shared19:47
jelmer(created with "bzr init-repo")19:48
glyphjelmer: interesting19:48
glyphjelmer: is there a series of commands that will make that happen, or do I have to mess with files in .bzr?19:48
glyph('touch .bzr/repository/shared-storage' if I understand the magic correctly?)19:49
jelmerglyph: touch .bzr/repository/shared-storage19:49
jelmerthough "bzr reconfigure" might also have an option that will do that for you19:49
glyphjelmer: no option I can see in the --help19:50
lifelessjelmer: sphinx *pickles* stuff? wtf?19:58
jelmerglyph: I can't either, so I've filed bug 89331220:38
ubot5Launchpad bug 893312 in Bazaar "reconfigure can not make a repository shared or unshared" [Medium,Confirmed] https://launchpad.net/bugs/89331220:38
jelmerlifeless: the build() method in sphinx pickles the build environment and saves it to disk20:39
lifelessjelmer: aieeeeeeeeeeeeeeeeee I'm blind20:41
salgadohi.  I thought there was an easy way of committing the result of a merge using the message of the last merged revision, but I can't seem to find it?20:41
jelmerlifeless: :)20:46
jelmersalgado: I'm not aware of one..20:46
jelmersalgado: it should be pretty easy to write a hook that does that though20:46
lamalexlifeless, ping- are you around?20:48
salgadojelmer, oh, ok, thanks.  I might give it a go at some point :)20:50
lifelesslamalex: hi21:05
lamalexlifeless, im trying to use testtools but im getting a goofy error i dont really understand when i run my tests with python -m testtools.run21:14
lamalexhttp://paste.ubuntu.com/745394/21:14
lifelessyour test isn't importable21:19
lifelessprobably you have the name 'foo.py'21:19
lifeless'foo.py' is not importable.21:19
lifeless'foo' is21:21
lifelessah - launchpad-tests.py21:21
lifelessrename that launcher_tests.py; testtools.run launchpad_tests21:21
lamalexlauncher21:21
lamalexbut really?21:21
lamalexit's a python file21:21
lamalexwhy wouldn't it end in .py21:21
lamalexlike every other python file21:22
lifelessit should21:22
salgado /afk21:22
=== salgado is now known as salgado-afk
lamalexis launchpad_tests a class name/21:23
lifelessno, its a module name21:24
lifelesslauncher_tests21:24
lifelessdo this21:24
lifeless$ python21:24
lifeless>>> import launcher_tests21:24
lifelessit will fail21:24
lamalexah ok21:26
lamalexi got it21:26
lifelessjelmer: so for clarity - sphinx upstream went insane, right ?22:31
lifelessjelmer: can we get it rolled back in precise? And send some stormtroopers to the authors?22:31
jelmerlifeless: they're not pickling the entire docs, just some bits of the configuration22:45
jelmerlifeless: it's not that bad, is it?22:46
lifelessjelmer: you tell me, how do they handle the config changing?22:46
lifeless2-way diff?22:46
lifeless3-way?22:46
jelmerlifeless: I have no idea22:46
lifelessIt seems like a likely source of failure-to-update bugs22:47
lifelessas well as making the sphinx environment suspectible to arbitrary code execution, so becomes security sensitive22:47
lifelessso yeah, I think its pretty bad22:47
lifelessadmittedly not as bad as the python json modules default-arbitrary-code-execution facility22:48
jelmerlifeless: hmm, /usr/lib/pymodules/python2.7/sphinx/environment.py:6622:48
jelmer# This is increased every time an environment attribute is added22:49
jelmer# or changed to properly invalidate pickle files.22:49
jelmerENV_VERSION = 3922:49
jelmerlifeless: I don't think there are situations where we open random pickle files though22:49
jelmers/don't think/know/22:49
jelmerehm, know there aren't22:49
lifelessif I can alter your pickle file, I can make you run arbitrary code.22:50
lifelessIts precisely as safe as 'eval <arbitrary file>'22:50
jelmerlifeless: sure22:50
jelmerlifeless: but this is just data generated by a local version of sphinx, stored for later reevaluation22:51
lifelessjelmer: I understand that; I don't understand why they need that, and it is insecure22:52
jelmerlifeless: whether it is insecure depends on how they use the pickle file, and in the overall setup, who can write to it22:52
spivlifeless: configuring sphinx already involves arbitrary code22:52
spivlifeless: so I'm not sure it's any less safe security-wise, but that certainly means its unsafe for robust pickling :)22:53
lifelessspiv: :)22:53
lifelessjelmer: its fundamentally not my problem, at least I know now to avoid sphinx for all my projects.22:53
lifelessjelmer: yes, I am willing to not use a tool because it uses pickle.22:54
spiv(or perhaps my hazy memory of how sphinx works is wrong, but I have a pretty strong gut feeling that pickles are a bad idea here)22:54
mwhudsonspiv: -here22:54
jelmerlifeless: I don't like pickles either, but I don't see how it is necessarily a security issue.22:54
spivmwhudson: hmm, I'm not *entirely* against pickles22:54
mwhudsonspiv: i like them in burgers, i guess?22:55
spivmwhudson: there's a very occasional quick hack where they can be tolerable ;)22:55
spivHah22:55
* mwhudson is making changes that take a few minutes to test, please excuse ongoing silliness22:55
lifelessI think pickle is fine when you can be absolutely sure noone else can ever under any circumstance compromise the pickle.22:55
spivmwhudson: you can't be sillier than all out for 47 :P22:56
lifelesse.g. when its a tempfile() you immediately unlink :)22:56
mwhudsonspiv: hah22:56
lifelessbbs22:56
mwhudsoni think the idea that you can serialize arbitrary objects is a fairly hair-raising one22:56
mwhudsonspiv: even ponting scored some runs last time though22:56

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