/srv/irclogs.ubuntu.com/2015/09/14/#launchpad-dev.txt

=== StevenK_ is now known as StevenK
cjwatsonapt by-hash is going to need at least https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798919 fixing before we can use it07:15
cjwatsonI believe I have all the LP changes done for InRelease, but I need to get some internal mirroring etc. fixes landed first.07:16
cjwatson(All proposed, so I'll bug a webop once I catch one)07:16
wgrantCan we actually deploy mirror fixes atm?07:17
wgrantThere was that RT that Adam said might have been progressed or something.07:17
cjwatsonIs this https://rt.admin.canonical.com/Ticket/Display.html?id=83847 ?07:18
cjwatsonHa, I think I missed the existence of that charm07:18
cjwatsonIs canonical-magic-mirror not being used any more?07:18
wgrantmagic-mirror is used for the split07:18
wgrantBut we also need to verify that the charm syncs InRelease last.07:19
wgrantAs it wasn't doing with Translations-* until that ticket.07:19
cjwatsonRight07:20
wgrantThe charm doesn't do any weird stuff like magic-mirror, just the two-stage sync.07:20
wgrantcjwatson: Did you look into Tarmac git support in any depth?07:21
wgrantI don't intend to excise bzrlib's command processing etc. at this stage.07:21
cjwatsonwgrant: Only to the extent of satisfying myself that it isn't hard and doing some extra API exports for it07:23
cjwatsonzyga said he was working on it, but I think we should time out on that soon.07:23
cjwatsonI wonder where https://pastebin.canonical.com/139395/ comes from07:25
cjwatsonThere are similar files in puppet, but not ports-sync.07:25
wgrantcjwatson: I also intend to add BugBMP tomorrow.07:38
wgrantInitially populated by BugBranches being added, but also manageable explicitly.07:38
wgrantEventually the diff generator should ask turnip to regexp the new commits to link bugs.07:39
wgrantI think that's the only reasonable approach for git, do you agree?07:39
wgrantcjwatson: Hm, I didn't realise ports-sync was different.07:40
wgrantcjwatson: It may be manually maintained; there are few ports mirrors.07:40
cjwatsonBugBMP etc.> Agreed.07:41
cjwatsonwgrant: Yeah, appears to be (see #is)07:41
wgrantSorry, busy collecting popcorn and reading too many channels.07:41
wgrantHaven't caught up.07:41
* cjwatson checks whether cdimage's two-stage sync handles InRelease and finds he did that in 201107:43
wgrantHeh07:44
wgrantThat's an easy one, then.07:44
cjwatsonAlso I checked that I couldn't reproduce anything like the original apt InRelease security problems with precise and trusty07:47
cjwatson(Indeed, precise just has InRelease disabled with a big hammer)07:47
wgrantOh, I didn't realise it was disabled.07:47
wgrantSince Debian was using it by that point.07:47
wgrantMaybe it was disabled while the sensible gpgv usage was fixed.07:47
cjwatsonI guess our apt was a while out of sync.07:48
cjwatsonRight.07:48
wgrantRather than trying to parse it out manually.07:48
cjwatsonIn trusty, if you try tricks like appending an InRelease file, then it ignores the unsigned portions of the file07:48
cjwatsonWhich feels a bit odd, but not exploitably so07:49
wgrantThat sounds like it's doing the right thing.07:51
wgrantIt is a little odd, and there is an argument to be made for failing on non-whitespace outside the sig, but it doesn't really worry me.07:51
wgrantI don't remember how I found it the first time, but I'll have a poke around the code too this week.07:53
cjwatsonYeah.  Thanks.08:01
cjwatsonOn apt by-hash, I think we probably can in fact do most of it without the bug above being fixed, just not the Acquire-By-Hash flag in Release.08:02
wgrantYep08:02
wgrantThe fallback is rather unpleasant, but we have little choice for at least a couple of years.08:03
cjwatsonIt'll need an apt-ftparchive backport (or we could do it in LP directly, but I don't think it's worth it).  Fortunately a small one.08:03
wgrantOh, I didn't realise a-f had support.08:03
wgrantHow does it handle GC?08:03
cjwatsonKeeps three by default.08:04
wgrantI'd be doing it in LP.08:04
wgrantBecause we need to do it for NMAF anyway.08:04
cjwatsonTrue.08:04
wgrantIt's not dissimilar from the Release code which we already reimplement.08:04
cjwatsonI think we want finer-grained control than a-f offers; it only lets you control the count.08:04
wgrantWe currently let a-f write directly to dists, but that's only because it's convenient.08:04
cjwatson(APT::FTPArchive::By-Hash-Keep)08:04
wgrantIt would be entirely reasonable to have it write to a temporary directory, then we grab the files and do whatever we want with them.08:05
wgrantI prefer to keep our dependency on a-f to a minimum.08:05
cjwatsonYeah, I guess so.08:05
lifelesscjwatson: since you're hacking on email notifications09:34
lifelesscjwatson: there is one bug (I don't have it to hand) that would make me so so so super happy09:34
lifelesscjwatson: which is that LP always sends mail to *me* even if I'm only indirectly subscribed09:35
lifelesscjwatson: which breaks GMail 'mute'09:35
wgrantlifeless: Just bugmail?10:00
wgrantThere's a bug about that, let me find it.10:00
lifelesswgrant: bugmail is ~99% of my LP mail10:10
lifelesswgrant: so even if its not *just*.10:10
lifelesswould still be happy happy joy joy schnaaaake time.10:11
lifelessNight all.10:11
wgrantlifeless: Oh sure, just checking there were no other cases.10:11
wgrantIf we fix one source and you still whine, that's not good :)10:11
wgranthttps://bugs.launchpad.net/launchpad/+bug/13859210:14
mupBug #138592: Bug notifications have personal To: header but aren't personal <email> <lp-bugs> <notifications> <Launchpad itself:Triaged> <https://launchpad.net/bugs/138592>10:14
cjwatsonlifeless: Mm, that wouldn't be too hard, I guess.  Some code review stuff already does something kind of similar (well, it actually does a weird thing where it tries to work out which of the people the notification's being sent to that you're allowed to know about, but I see even less justification for that for bugs than for code)11:24
cjwatsonCode at least includes the MP address11:24
rpadovanihey all :-) There is a way to login to local installation with a non-admin user?11:31
cjwatsonrpadovani: Use utilities/make-lp-user11:31
rpadovanity!11:31
cjwatson(You'll want to start a local keyserver first, probably - utilities/start-dev-soyuz.sh is overkill for that but works)11:31
cjwatsonwgrant: Answers should behave the same way, I think.11:33
wgrantHm, indeed.12:06
rpadovanicjwatson, o/ I found a very trivial bug to fix, so I wrote the one line change needed, but I'm a bit confused about how writing the related test. To don't bother you right now, I wrote all in the description of the MR - when you have some spare time, could you please take a look? Thanks so much :-)12:41
rpadovanihttps://code.launchpad.net/~rpadovani/launchpad/unhide-comments/+merge/27095012:41
cjwatsonrpadovani: You'll want to add an optional comment_owner argument that's passed to makeBugComment as owner=, like TestBugHideCommentControls.getContext just below.  Then extend TestMessageVisibilityMixin with a test saying that the comment owner can see the comment.12:45
rpadovanicjwatson, okay, thanks, I try12:46
rpadovaniwell, I pushed the test, but lp doesn't want to update my branch information. Time to study I think, I'll take a look later13:18
cjwatsonrpadovani: I'll keep rescanning it until it works.13:18
rpadovanithanks13:19
cjwatsonrpadovani: In fact, it's there now.13:21
rpadovanioh, great13:24
rpadovanihi cjwatson, thanks for your time :-) I have a couple of questions about your review: you wrote hidden comments need admin style - is that the one with gray background? If yes, it's already present, without having to edit BugComment.show_for_admin15:49
rpadovaniAnother question: how stories are supposed to work? I write what is expected and then write some code that should demonstrate that?15:50
cjwatsonrpadovani: Oh, right, the implementation of show_for_admin is different from how I remember.15:56
cjwatsonrpadovani: Stories *are* tests.15:57
cjwatsonThe indented stuff is run.15:57
cjwatsonhttps://docs.python.org/2/library/doctest.html15:57
rpadovanioooh, I see! How much things I have to learn, thanks :-)15:57
cjwatson(They are mostly very irritating and we prefer not to write more of them, but it's OK to extend existing ones a little bit if there isn't an immediate alternative.  Rewriting as unit tests is usually better.)15:58
cjwatsonrpadovani: I think a pagetest (== .../stories/...) addition is a good idea here even if you don't need to change show_for_admin.15:58
rpadovaniok, great, I add it, thanks15:59
mapreriJOOI (and OT): do you think you'll be able to move to py3 in only 5 years?15:59
cjwatsonmapreri: Heh, hopefully.  Every so often we shave off another bit of the problem.16:00
maprerilooks like lot of pain from an outsider pov16:00
maprerigood luck :)16:01
cjwatsonAfter we move off buildout, we'll be able to upgrade to a current ZTK, and then it might actually be possible to see how terrible the situation is.16:01
cjwatsonRight now it's only possible to attack in the abstract, which isn't very rewarding.16:02
cjwatsonAlso, we're still mostly deploying on 12.04, and Python 3.2 wasn't a brilliant porting target.16:02
mapreriic16:03
cjwatsonWhy do you ask?16:05
rpadovanisorry to bother again, how could I run the story test? Using python -m doctest -v lib/lp/bugs/stories/bugs/xx-bug-hidden-comments.txt doesn't work16:05
maprericjwatson: just curiosity (sometimes i really act like a kid, with my curiosity) :)16:07
cjwatsonrpadovani: bin/test -vvct lib/lp/bugs/stories/bugs/xx-bug-hidden-comments.txt16:08
cjwatson(or a regex that matches that)16:08
rpadovanithanks16:08
cjwatsonmapreri: OK, just wondering about the choice of five years16:08
maprericjwatson: py2 is doomed for EOL around 2020, you know...16:09
cjwatsonOh right16:09
cjwatsonIt's not a timeframe I've been worrying about much16:10
cjwatsonToo many closer ones :)16:10
maprerieheh16:11
cjwatsonI did go through recently and get rid of most of our use of class advice, which was a multi-thousand line patch needed for py316:12
cjwatsonSo we're not ignoring it :)16:12
maprerinice :)16:14
rpadovanicjwatson, how can I use user_browser.open() to log in with a different user? My edits broke test in xx-bug-hidden-comments.txt at line 40 because now the comment is visible - to test if a ordinary user doesn't see the hidden comment, I need to change user - how? (or, what can I read to understand the solution?)16:20
cjwatsonrpadovani: You'll need to get hold of a different browser instance that's authenticated as a different user.  The pagetests often rely on the sample data shipped with Launchpad, so the easiest way is probably something like   >>> test_browser = setupBrowser(auth="Basic test@canonical.com:test")16:28
cjwatsonThen you'll want to test that the comment appears for the non-admin user that posted the comment (with basically the same set of tests we perform for admin users), and doesn't appear for a different non-admin user.16:29
rpadovaniokay, thanks16:30
cjwatsonlib/lp/testing/pages.py is the file that sets up things like user_browser16:30
rpadovanicjwatson, I pushed new stories - thanks for your suggestions, I hope to become more independent with time ;-)16:39
maprerirpadovani: maybe assign yourself the bug?16:41
cjwatsonmapreri: not required16:42
cjwatson(I mean, neater perhaps, but the QA bot is about to do so anyway)16:43
cjwatsonrpadovani: LGTM, thanks, landing16:43
maprerigoody bot16:43
rpadovanicjwatson, thanks, I'll take a look to another bug then - usually I assign bugs to myself only when I'm sure I know how to fix them, to don't block any other user that wants to fix it16:47
cjwatsonReasonable.16:48
=== Guest39525 is now known as anthonyjf
=== anthonyf is now known as Guest95842
=== Guest95842 is now known as anthonyjf
blrmorning20:37
cjwatsonrpadovani: Have you looked at your buildbot test failures?22:33
cjwatsonrpadovani: Some are spurious, but the failure in lib/lp/bugs/stories/bugs/xx-bug-hidden-comments.txt is real, which is weird because I thought you said you'd run that.22:33
wgrantMorning.22:36
cjwatsonrpadovani: Ah, you need to fix BugTaskNavigation.traverse_comments too22:37
* cjwatson assumes rpadovani has gone to bed, so fixes locally and runs the bugs tests22:42
wgrantcjwatson: Nothing appeared anomalous DB-wise overnight?22:44
cjwatsonwgrant: Nothing I saw, no.22:45
wgrantLovely.22:45
wgrantSo my plan for BugBMP is that in the bzr case it will be tied exactly to BugBranch while the MP is open.22:48
wgrantWhich is slightly messy, but preserves the existing behaviour and hopefully makes things relatively unconfusing.22:48
cjwatsonYeah, I was wondering how you were going to make that not weird ...22:48
wgrantWe can probably remove the UI to link a branch directly later on, and need to change bug notifications.22:49
wgrantI'm very open to suggestions if you have any...22:49
cjwatsonSo you'd be able to edit BugBMP, but in the bzr case it would push it through to BugBranch?22:49
wgrantBut I think BugBMP is the only approach that makes sense, so we have to make it usable somehow.22:49
wgrantRight.22:49
wgrantOr maybe it only resyncs when the preview diff is updated.22:50
cjwatsonYeah, none of my half-thoughts about how to do it on GitRef directly have made any kind of sense.22:50
wgrantHmm.22:50
cjwatsonIf it only resyncs when the preview diff is updated, then editing BugBMP is difficult.22:50
wgrantTrue.22:50
cjwatsonI don't think that makes sense.  After all, today, if you link a branch to a bug then that's reflected immediately in the BMP.22:50
cjwatsonWithout updating a diff.22:51
wgrantYeah.22:51
wgrantWell.22:51
wgrantNo, maybe not.22:51
wgrantIf we remove the BugBranch UI...22:51
wgrantThen you can only link by pushing a new rev, which will update the diff, or by clicking the link on the BMP directly, or by using the BugBranch API.22:51
cjwatsonThat would also make it impossible to see bzr branches that fix bugs unless they've had MPs proposed.22:52
cjwatsonWhich, granted, won't work in the git case.22:52
cjwatson(Although it does work on GitHub ...)22:52
wgrantIndeed.22:52
cjwatsonWe could do a BugGitRepository with very weak links.22:53
wgrantI don't know how GitHub decides what is relevant.22:53
cjwatsonI'm not sure how pulling from one branch to another would work.  It would have to be tied into merge detection somehow.22:53
cjwatsonOtherwise everything is attached to everything.22:53
wgrantMaybe it's only the first time each rev appears.22:53
wgrantRight, exactly.22:53
wgrantThe LP logic for that is very weird.22:53
cjwatsonAnd there are certainly some branches with implausible numbers of bug links as a result.22:54
wgrantI did at one point know why trunks sometimes got bugs linked.22:54
cjwatsonIt might be worth some effort working out GH's logic.22:54
wgrantI can't remember now, though.22:54
cjwatsonFirst time each rev appears doesn't seem a terrible start, but then what if you rename the branch22:55
wgrantYup, exactly.23:00
wgrantWill poke GitHub.23:00
cjwatsonWell, we can fairly cheaply work out which branches are ancestors of which other ones in a repository23:00
cjwatsonThat's near enough how our merge detection works23:00
wgrantYep, but what happens if you have two trunks?23:00
cjwatsonSo it could just be any links from branches that aren't merged23:00
cjwatsonDoesn't matter whether they're trunks or not23:01
wgrantWhat does "that aren't merged" mean, if not merged into trunk?23:02
cjwatsonThe interesting commits are the ones that are unique to a branch23:02
cjwatsonNow, the trick is handling the case where a branch is merged into a trunk and then deleted23:02
cjwatsonCouple of possible approaches to that23:03
wgrantOr where I push a branch, then push a superset of the same branch to a different name because the first name was wrong.23:03
cjwatsonOne promising one might be to have merge detection remember that everything older than the mergepoint is uninteresting for commit scans23:03
cjwatsonMaybe23:03
cjwatsonIt's hard to tell the difference between your case and the case of the creation of a new trunk.  Whatever a trunk is.23:05
wgrantExactly :)23:05
cjwatson(Anything that relies on us knowing what a trunk is is probably wrong ...)23:05
cjwatsonSeems like a thing worth trying out on GH, anyway.23:06
wgrantYep, will do.23:06
wgrantcjwatson: Are you still looking at that testfix?23:31
cjwatsonYes23:32
cjwatsonNearly done, just trying to get the blasted thing to scan before pushing the fix rev23:32
wgrantHah23:32
wgrantThanks.23:32
cjwatsonlp.bugs passes now though23:32
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/testfix-unhide-comments/+merge/27104323:37
wgrantHmm.23:37
wgrantI'm not actually sure I like randoms being able to unhide their comments, but I guess until we have a way to fix mistakes it's awkward.23:38
wgrantSo it'll do.23:38
cjwatsonYeah, it's not unproblematic.  But I guess that in cases of serious abuse we'd suspend accounts anyway.23:39
wgrantRight, but it is open to other more subtle abuse.23:39
cjwatsonAnd they can always repost, it's not like it really helps much to not let them unhide23:39
wgrantMaking parts of the conversation disappear and then reappear when it's convenient.23:39
wgrantcjwatson: Did you prefer LaunchBag over self.request deliberately?23:40
cjwatsonI didn't know that API well; I noticed that self.request was =None in Navigation's constructor, and found ILaunchBag used elsewhere23:41
wgrantAh, OK, sounds reasonable.23:41
cjwatsonMaybe comment hiding/unhiding should go in the activity log.23:41
wgrantNo.23:41
wgrantSpam is a thing.23:41
wgrantWe should fix the hiding silliness to be admin-only eventually.23:42
wgrantFeel like fixing the rest of that traversal check while you're there?23:42
wgrantIt's moderately annoying for us, and it's the next line...23:42
cjwatsonSorry, I'm nearly asleep.  What's the problem with it?23:43
cjwatsonOh, it doesn't allow registry does it23:44
wgrantRight, it should probably use Bug.userCanSetcommentVisiblity23:44
wgrant+i23:44
cjwatsonSo should get_visible_comments, then23:45
wgrantAh, get_visible_comments doesn't allow project-privileged users, it seems.23:46
wgrantWhich is arguably correct from a spam perspective.23:46
wgrantBut awkwardly inconsistent.23:47
cjwatsonSo they can hide spam, but can't see that they've done it?23:47
wgrantApparently.23:47
wgrantcjwatson: Ah, so GitHub doesn't actually track this.23:52
wgrantcjwatson: The PR page doesn't directly list the issues, only by linkifying them in commit messages.23:52
wgrantAnd the issue page tells you that a bug was closed by merging into the default branch, or that it was referenced in a commit (not a branch)23:52
wgrantOf course in Git you don't need to know the branch, just the repo, and it's always the same repo.23:53
wgrantWell, on GitHub it's always the same repo.23:53
cjwatsonAh, right, the commit link has no ref context23:54
* wgrant tries a cross-repo reference.23:54
wgrantWe can't be quite so simple, as we have multiple repos.23:55
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/testfix-unhide-comments/+merge/271043 brushed up slightly23:55
wgrantIt seems to only show the first time it saw each commit.23:56
wgrantIf I reference wgrant/test#5 in a commit in wgrant/test2, the issue shows that.23:56
wgrantBut subsequently pushing that same commit to wgrant/test doesn't show anything, unless it causes the issue to be closed.23:57
wgrantcjwatson: Thanks, looks good.23:58
cjwatsonThanks, landing.23:59
wgrantHmmmmmm.23:59
wgrantTrying to think how this should work.23:59
wgrantI guess it's not so bad if we don't link from the repo to the fixed bugs.23:59
wgrantThe list on a bug will not grow large, just the list on the repo.23:59

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