[00:15:48] https://github.com/Roave/FunctionFQNReplacer [00:15:53] Krinkle: ^ is kinda interesting [00:20:31] Reedy: Hm.. indeed. [00:20:41] Micro optimisations indeed... [00:20:52] But if we're gonna move to code being mostly namespaced... [00:20:56] I knew about the behaviour difference. It's to some extent a feature used to enable mocking of native global functions [00:21:16] I filed https://phabricator.wikimedia.org/T200629 as a form of a TODO towards that [00:21:54] Yeah, if you namespace something, all references within should be imported or used as global explicitly. [00:22:00] This is fairly straight forward with classes. [00:22:07] But somewhat tedious for function calls. [00:22:46] I'd expect PHP to be able to statically determine that there are no functions in the namespace, but then again, they can be created later, which screws it up. [00:23:01] The solution, naturally, is not to have global functions :P [00:23:19] Let me know when you build that time machine for brion [00:23:34] One more reason to move global functions to classes, even if just static and under a class/namespace. [00:23:51] :) [00:25:35] Migrate them all bit by bit and deprecate deprecate deprecate :) [00:25:47] Or, send me or Tim back in time to warn us [00:25:51] I'd rather we just kill all global functions. [00:26:05] James_F|Away: go talk to zend and get it fixed upstream pls [00:26:17] Rather than move-and-deprecate and then deprecate-and-kill [00:26:22] Ha. [00:26:31] Cause that's worth baring in mind [00:26:34] It's not just our global functions [00:26:41] is_string() etc are affected too [00:27:52] Oh, sure, but we can at least avoid ours. [00:28:15] just replace all globals with our own implementations [00:28:20] i call it nimby.php [00:28:43] Publish it on packagist and see how many people start using it? [00:29:02] Do a nimby.js for node too [00:29:57] nimby/left-pad.php [00:30:06] hehe [00:30:30] Or maybe we can use class GlobalFunction { public static function __call() { /* evil */ } } to fix our problems. [00:30:38] trololol [00:39:34] Anyone want an easy merge? https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/EducationProgram/+/448991/ [00:44:59] https://github.com/wikimedia/mediawiki-extensions-TrustedXFF/commit/197c3dab03de33091031d8f10dfb204e9d5a878f [00:45:16] I merged broken code [00:53:54] Reedy: Done. [00:53:58] Cheers [00:54:06] Stupid we're maintaining this... [00:54:22] But in the process of trying to check stuff, you find "broken"... [00:55:40] Trying to see how broken the EP pages are without EP :D [01:01:56] can't believe EP is still deployed in 2018 [01:03:43] I wonder if it should go to code stewardship review [01:05:20] We're trying to get rid of it [01:05:31] But people have suddenly gone "BUT THINK ABOUT TEH DATA" [01:05:59] And apparently hte WMF won't budget for an import tool to the new platform [01:06:40] if we'd gotten rid of it 3 years ago there would be 3 years less data to think about [01:06:46] Not really [01:06:54] It's not been used on a few wikis for a few years [01:07:46] I've just found another bug [01:07:52] It doesn't enforce uniqueness of course names [01:08:04] So I have multiple named the same.. [01:08:06] Can't view them [01:08:10] Because it uses the name, not the id [01:08:57] can we not just do a static-bugzilla type thing with it? [01:09:45] Probably. If someone wants to put the time/effort into it [01:25:05] ok, wtf is this [01:25:14] MariaDB [enwiki]> select page_id, page_namespace, page_title from page where page_title LIKE 'Education_Program:%' LIMIT 10; [01:25:14] +----------+----------------+-------------------------------------------------+ [01:25:14] | page_id | page_namespace | page_title | [01:25:14] +----------+----------------+-------------------------------------------------+ [01:25:14] | 51898375 | 4 | Education_Program:USF_Environmental_Law_Project | [01:25:14] | 53140271 | 5 | Education_Program:USF_Environmental_Law_Project | [01:25:16] +----------+----------------+-------------------------------------------------+ [01:25:21] 2 rows in set (13.96 sec) [01:30:31] https://en.wikipedia.org/wiki/Wikipedia:Education_Program:USF_Environmental_Law_Project [01:31:07] mmmm [01:31:13] A viewer on Toolforge with a local import of the table still seems attractive (or even straight from replicas, but I imagine we won't be keeping it there forever) [01:31:14] I think I've confused myself [01:31:27] It can be provided as sql on dumps.wikimedia.org. [01:31:45] I thought I saw EP NS pages in the page table somewhere [01:31:49] I cannot for the life in me find them again [01:31:51] so that if they mess it up or it goes away, it can always be reimported or re-created elsewhere [01:32:07] You'd need to select by namespace in that case, right? [01:32:55] Yes [01:32:57] But [01:32:57] MariaDB [enwiki]> select * from page where page_namespace = 446; [01:32:57] Empty set (0.00 sec) [01:33:02] Right [01:33:08] I can't remember what/where I was looking that I found one [01:33:09] Maybe on another EP wiki? [01:33:22] or with the prefi like you did, but on namespace=0 [01:33:24] prefix* [01:34:38] It's quite possible I'm losing it [01:34:46] Or I mistyped the NS id [01:35:04] But I created a task saying it put stuff in the page table [01:35:08] Now I can't find where I found that [01:35:35] Oh [01:35:37] Talk pages [01:35:39] 447, not 446 [01:35:44] Ok, good [01:35:47] I'm not completely losing it [01:37:49] Ah, interesting. Yeah, they have talk pages. Didn't think that either. [01:37:53] https://en.wikipedia.org/w/index.php?title=Education_Program:McKendree_University/PSY_153_H_(Fall_2013)&action=history [01:38:00] Multi-line edit summary ftw? [01:39:20] Reedy: Right, not just discussions, but actually content. E.g. https://en.wikipedia.org/wiki/Education_Program_talk:McKendree_University/PSY_153_H_(Fall_2013)/Grading is somehow magically transcluded from https://en.wikipedia.org/wiki/Education_Program:McKendree_University/PSY_153_H_(Fall_2013) [01:39:23] complete with edit section link [01:39:44] so it uses the talk space to stuff away regular wikitext blobs [01:47:19] reedy@tools-bastion-03:~$ mysqldump --defaults-file=/home/reedy/replica.my.cnf --lock-tables=false -h enwiki.analytics.db.svc.eqiad.wmflabs enwiki_p ep_orgs ep_courses ep_articles ep_users_per_course ep_students ep_instructors ep_cas ep_oas ep_events ep_revisions > ep-enwiki.sql [01:49:33] ofc, views [02:01:49] Reedy, might be easier to mysqldump from a real prod replica and remove the course tokens afterwards [02:02:02] Mmm [02:02:32] I was just going on jynus saying "it seems the best way it to export them from cloud replicas " [02:03:49] ofc, are the tokens really that secret data at this point? [02:03:52] Does anyone care? [02:04:27] reedy@deploy1001:~$ du -h ep-enwiki.sql [02:04:27] 160M ep-enwiki.sql [02:06:05] Once the extension is undeloyed, you could also null the prod tables and then export :P [02:06:29] probably good to do anyway from a security POV. [02:06:53] lol [02:09:48] #!/bin/bash [02:09:48] wikis="arwiki cawiki cswiki dewikiversity elwiki enwiki enwikinews eswiki fawiki frwikisource hewiki hewiktionary itwikiversity lvwiki mkwiki nlwiki ptwiki ruwiki srwiki svwiki ukwiki" [02:09:48] for db in ${wikis[@]}; do [02:09:48] sqldump $db ep_orgs ep_courses ep_articles ep_users_per_course ep_students ep_instructors ep_cas ep_oas ep_events ep_revisions > ep-$db.sql [02:09:49] done [02:11:42] Krinkle: I think disabling the extension before dumps are done is gonna cause a poop storm [02:11:43] So... [02:11:43] https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/447953/ [02:11:47] Null tokens, dump [02:11:50] Upload [02:12:09] Then look at disabling [02:14:17] Yeah [02:14:37] good point [02:15:30] But that patch doesn't seem to have the desired effect [02:15:36] affect? [02:19:08] groupOverrides I guess? [02:21:05] Or even just without extension functions [02:21:39] Reedy: global [02:21:47] gah :) [02:21:58] it's currently making an array local to the closure [02:22:01] Yeah [02:22:09] I blame it being 3am [02:22:27] (post alcohol) [02:22:28] And writing it at 2am on a different day [02:22:29] Good point. It was also 3 am three days ago. [02:22:36] Yeah [02:22:38] Hehe [02:22:42] But EF shouldn't be needed... [02:23:04] Worth trying without I suppose, assuming nothing else in wmf-config is adding them. [02:23:10] It works locally without it [02:23:16] There's none in IS for a change [02:23:53] But... I'm not sure how the defaults from https://github.com/wikimedia/mediawiki-extensions-EducationProgram/blob/master/extension.json are merged at run-time. [02:24:05] I'd expect it to happen after your assignment, given batches/cached reading in prod. [02:24:20] But maybe ExtensionProcessor knows to merge it in a way to not override [02:24:22] not sure [02:25:56] Reedy: What does 'ep-bereviewer' do? It's granted to '*' by default. [02:26:03] I know [02:26:08] Just removed it in my amended patch :) [02:26:18] Add or remove yourself as reviewer from articles (ep-bereviewer) [02:27:13] right [02:27:20] I guess that doesn't work for anons [02:27:29] but given implicitly regardless [02:28:17] ["ep-bulkdelcourses"]=> [02:28:17] bool(false) [02:28:17] ["ep-remarticle"]=> [02:28:17] bool(false) [02:28:17] ["ep-addstudent"]=> [02:28:20] bool(false) [02:28:23] It works! [02:36:04] Neutered