[12:53:14] Krinkle: what do you think of deprecating Database::insertSelect()? not used heavily https://codesearch.wmcloud.org/search/?q=insertSelect&files=&excludeFiles=&repos= and has quite a lot of code footprint and explicitly is unsafe (from its documentation: @warning If the insert will use an auto-increment or sequence to determine the value of a column, this may break replication..." [13:25:28] pmiazga: regarding ES6 and "evergreen", see comment at https://phabricator.wikimedia.org/T178356#8740573 [13:26:31] Amir1: what's the alternative? [13:29:31] Krinkle: do select and then insert (basically ::doInsertSelectGeneric()) [17:50:18] I want to kill a search related hook but in tests, I'm unable to replace the usage of the hook by overriding the class. Any ideas? https://gerrit.wikimedia.org/r/c/mediawiki/core/+/890901 [17:51:13] So before in the test, we do $this->setTemporaryHook( 'ExampleHook', $hookHandler ) in the else branch [17:51:40] But now the new code advises we override the class method and I'm not sure how to do that in tests, any guidance will be of help, thanks! [18:39:06] Krinkle, re train log triage today, I was wondering if you have inputs for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/947904. I'm wondering whether to log a warning instead of throwing? What would be the correct way to handle empty string domains? That would mean the domain is invalid and no target in the DB? Not sure if I'm reasoning this accurately. [18:39:52] So for invalid domains, we should just ignore I guess? Rather than create a JQG and not be able to push because of an invalid domain? [19:00:27] xSavitar: there's a couple different ways to do that. The simplest most generic way would be with a PHPUnit mock. It looks like those test cases instantiate `new StringPrefixSearch;` so that could instead be something like getMock() where you override completionSearchBackend() to return something static with willReturn() or dynamic with willReturnCall. [19:00:36] If that doesnt' work, you could make an inline subclass like this: [19:00:57] $x = new class() extends StringPrefixSearch { public function completionSearchBackend() { … } }; [19:01:18] lastly, looking at these search results, it looks like a dedicated helper exists already: [19:01:18] https://codesearch.wmcloud.org/search/?q=ion+completionSearchBackend&files=&excludeFiles=&repos=#Extension:BlueSpiceDistributionConnector [19:01:36] So if MockCompletionSearchEngine works here, that might be easiest. [19:02:23] Feel free to reach out to the search platform team on IRC in #wikimedia-search if you get stuck. I don't think we have to do this for them per-se, but it's nice to do en-mass if it's simple enough indeed. [21:01:48] Thanks Krinkle. I tried the inline subclassing but I think I may be doing something wrong. I'll explore all options then see how it goes.