cjwatsonwgrant: Have you had a chance to figure out how to QA https://bugs.launchpad.net/launchpad/+bug/1489674 ?23:03
mupBug #1489674: BugNotificationBuilder.build crashes with Unauthorized on invisible private teams <403> <fallout> <qa-needstesting> <regression> <Launchpad itself:Fix Committed by wgrant> <https://launchpad.net/bugs/1489674>23:03
wgrantcjwatson: Oh yeah, I should try that.23:03
wgrantLet me see.23:04
cjwatsonwgrant: Thanks23:05
cjwatsonblr: Were you going to land https://code.launchpad.net/~blr/launchpad/diff-code-select-bug-1483925/+merge/268017 ?23:05
blrcjwatson: oh, forgot about that. Yes I should do23:05
cjwatsonI figured that was probably buried in flu.23:06
blrthanks cjwatson23:06
cjwatsonwgrant: A quick test suggests that there are various BaseMailer call sites that could trigger this too, for example modifying a branch in the web UI that has a subscription from an inaccessible private team, so I think my first job tomorrow is going to be figuring out a central fix for that.23:36
cjwatsonOr as central as possible.23:37
wgrantcjwatson: Sounds reasonable. I don't know how central it can be, but it needs investigation.23:41
cjwatsonMaybe BaseMailer needs to grow a rule that all uses of it need to be zopeless-style.  Fixing this "centrally" would still involve sprinkling rSP over all the various constructors.23:42
cjwatsonJobs, scripts, or whatever.  Not with a user interaction.23:42
cjwatsonWhatever the correct term is.23:42
wgrantAh, right. The defining feature is PermissiveSecurityPolicy.23:43
wgrantBut that makes it rather difficult to use from the large number of email callsites that aren't presently asynchronous, unfortunately.23:43
cjwatsonThat's the one, thanks.23:43
cjwatsonMaking those async would not be too hard nowadays.23:44
cjwatsonI'll have to see whether it's worth it.23:44
cjwatsonI always thought sending mail directly from something like a page rendering operation was a bit odd, though.23:45
wgrantOh, it would certainly be a positive change.23:46
wgrantThe question is how much work it is to fix.23:46
cjwatsonI could stick an assert getSecurityPolicy() == PermissiveSecurityPolicy into BaseMailer and see how much of the test suite explodes.23:47
wgrantAll of +queue, for one.23:48
cjwatsonFrom a quick scan I think the currently affected mailers are Branch, BranchMergeProposal, GitRepository, and PackageUpload.  All the rest are only used from jobs or scripts.23:50
wgrantoh right, answers is async nowadays, isn't it.23:51
cjwatsonAnswers doesn't use BaseMailer (yet).23:51
cjwatsonBut I think its mail notifications are indeed async.23:51
cjwatsonBugs notifications are mostly async, except for the send_bug_details_to_new_bug_subscribers case you ran into.23:52
wgrantIf by "mostly async" you mean "lies"23:53
wgrantThe footer is calculated in the webapp.23:53
wgrantVery, very expensively.23:53
cjwatsonRight, but only in the new-bug case.23:53
wgrantMost bug edit timeouts go away if we make notification sending properly async.23:53
cjwatsonEr, new-bug-subscriber.23:53
wgrantThe webapp populates BugNotificationRecipient23:54
cjwatsonOh, yikes.23:54
wgrantSo the POST request calculates the set of people who should be notified and inserts a row for each of them, including the rationale text and footer etc.23:54
wgrantThe correct solution is of course a job that says "this change happened to the bug when it was in this state, now please populate bugnotification"23:55
cjwatsonI'll have a look at the BaseMailer cases tomorrow at least.  Would like to spend finite time in this swamp, but draining a bit of it is a prereq for landing team-mail safely23:56
cjwatson(I strongly suspect)23:56
cjwatsonAnyway, bed.  Night23:56
wgrantYou weren't even here today, were you?23:56
cjwatsonNope.  And mostly actually not, just nipping in briefly23:56
wgrantIf you can make it all PermissiveSecurityPolicy then that indeed makes things substantially simpler.23:57
cjwatsonCode has a suitable job framework already, so probably easy.  Soyuz might need a bit of fiddling.23:57
wgrantThough there's actually already a bug about the Soyuz one.23:58
mupBug #566339: Cannot accept package which would notify private email addresses <boobytrap> <email> <lp-soyuz> <notifications> <Launchpad itself:Triaged> <https://launchpad.net/bugs/566339>23:58

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