[08:34:43] how can one disable the caching of page diffs (i'm trying to debug something and the whole thing is cached) [08:35:01] i.e. the output of a SlotDiffRenderer [08:35:57] inductiveload: do you mean in production? [08:36:31] no, i mean on a test install [08:37:00] so nuking files or DB tables is OK if that's the way to go [08:37:15] (or messing with LocalSettings.php) [08:41:41] inductiveload: add wfRandom() to the cache key or disable memcached [08:53:59] thanks :-) [08:56:28] huh, once I turn off caching, the entire problem disappears: https://phabricator.wikimedia.org/T286227 [15:30:18] inductiveload: probably it's caching the message in your interface language without splitting the cache by user language [15:41:07] legoktm, so it doesn't really seem like a ProofreadPaqe issue then? [15:44:33] it looks like the msg function goes right to return `wfMessage( $key, ...$params )->setContext( $this );` [15:45:08] inductiveload: I think ProofreadPage needs to add the language code to the cache key [15:45:19] or render the message ->inContentLanguage() so its the same for all users [15:45:29] where does it do that (the cache key thing)? [15:47:56] $slotDiffRenderer->getExtraCacheKeys() maybe [15:48:03] looking at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/934b9a854629971d2ec7b63f220ca4263118d7c1/includes/diff/DifferenceEngine.php#1296 [15:48:43] ooooh, I see, this is the cache key for the whole page [15:49:06] as in "this particular diff render" [15:49:22] yeah, the entire diff's HTML is stuffed into the cache [15:49:33] i was thinking it was to do with the message [15:51:43] so adding $context->getLanguage()->getCode() to the cache key params should fix it [15:51:54] yes [15:53:34] this works: public function getExtraCacheKeys() { [15:53:34] return [ $this->context->getLanguage()->getCode() ]; [15:53:34] } [15:55:30] submit a patch ;) [15:55:37] on it [15:56:00] can it submit a patch off the top of a branch? [15:56:24] or do I have to do it from a fresh branch from master? [15:56:49] (not that it's hard to switch back) [15:57:12] if it's unrelated, it's generally better to do it from a fresh branch of HEAD of master [15:58:46] darn, thought so [15:59:29] You can submit a patch via the gerrit web interface too [15:59:35] Or stick it on your branch, and move it using gerrit [16:01:08] well at last PHP doesn't need to compile [16:01:48] such a PITA to switch branch for quick hacks when that leads to nuking a build state [16:02:14] good for the manufacturers of SSDs tho, since I end up with like 50 different trees [16:02:43] many of us keep extra clones of MW around for doing other patches [16:02:53] Or like I say, just submit directly through gerrit ui :P [16:03:17] you can also just submit a patch on top of your current stack, but if it conflicts, you just have to wait longer for it to get merged [16:03:49] or rebase it master/HEAD in gerrit, and remove it from your local branch :D [16:03:57] i'll just be good and use a fresh branch [16:04:24] keep it simple :-D [16:04:48] hmm, wonder how many other pages need this treatment.. [16:04:58] you can also print out the patch, mail it to the datacenter, and we can apply it for you [16:05:22] my printer is out of toner [16:05:30] can I just call and read it out over the phone? [16:05:35] legoktm: Don't be daft. Our DC's barely like having servers delivered :P [16:05:42] You can mail it to legoktm directly though [16:09:31] urgghhh [16:09:53] facepalm: I've been testing it with the cache off entirely, no wonder I can't get the bug to manifest again [16:10:40] * Reedy looks for popcorn [16:11:32] it was either that or my fix is so amazing it has a homeopathic effect on the code [16:11:56] and it imparts an essence of fixedness to it even when it's not actually present [16:16:30] that's weird: the IndexSlotDiffRenderer doesn't seem to have the same problem [16:16:43] but it's also using a localised message [16:19:48] oh wait, browser cache >_< [16:19:55] so many caches [17:16:01] inductiveload: btw if you accidentally put an extra newline between the Bug: line and Change-Id:. Gerrit won't report it back to Phabricator [17:32:36] >_< [17:32:52] can the git receive hook not detect and reject that? [17:39:17] it's easier just to fix it for people than reject patches [17:39:28] inductiveload: but you can use https://www.mediawiki.org/wiki/Commit-message-validator to catch it locally [17:44:40] i'd rather be able to run phan in docker :-D [21:33:36] is there a machine-consumable list of all wikimedia projects, including URL and dbname? [21:33:57] Sitematrix api? [21:34:46] that sounds right [21:34:47] cdhowie: use the site matrix api, https://meta.wikimedia.org/w/api.php?action=sitematrix&format=json [21:34:51] apparently i have been googling the wrong terms [21:34:56] perfect, thanks [21:35:38] Yeah that api will work [21:36:34] so each primary object here represents a language? [21:37:06] i think for my purposes i can reduce by concatenating the site sub-arrays [21:37:52] Going by https://meta.wikimedia.org/w/api.php?action=sitematrix&format=json&smtype=special%7Clanguage&smstate=all&smlangprop=site yeah each number in the json represents a language [21:40:03] thanks [21:40:57] I suggest using &formatversion=2 for slightly better representation [21:46:09] noted [23:32:52] ugh: An error occurred: Internal Server Error

Internal Server Error

[23:48:51] brilliant [23:48:59] what's that from?