On Tue, May 6, 2025 at 1:17 PM Reuven Lazarus [email protected] wrote:
Foreachwiki and friends are available in the Kubernetes container now, with a flag on the way to make it easy to invoke them via mwscript-k8s. ( https://phabricator.wikimedia.org/T378479) We've also resolved the resource-consumption issues with the shell loop approach, so that option is viable too.
Woohoo! Thanks! :D
(That is, simultaneously launching that number of jobs will no longer overload the Kubernetes infrastructure itself; of course it's still possible to use up the available compute resources, and it's also possible -- as ever -- for aggressive maintenance scripts to overload shared resources like the databases. But it's back on the table; consider it remediated from the temporary guidance "don't do this, it's dangerous" to the indefinite guidance "this is powerful, do it cautiously.")
*nods seriously*
Interactive scripts like eval.php can be used with mwscript-k8s in --attach mode (which forwards stdin and stdout to your terminal). ( https://wikitech.wikimedia.org/wiki/Maintenance_scripts#Input_on_stdin) Separately, note there's also mw-debug-repl to get a shell in a mw-debug pod, rather than a mw-script one. ( https://wikitech.wikimedia.org/wiki/MediaWiki_On_Kubernetes#MediaWiki_REPL )
*success kid meme* yay! Eval lives. :D
That said, mwscript-k8s can't support {my,}sql.php specifically, because we don't have a mysql client in the MW image and shouldn't add one. For now, you can run `sql` from the deploy hosts instead of the mwmaint hosts. The long-term replacement probably won't be a maintenance script at all but a dbconfig-aware wrapper around a local mysql client. ( https://phabricator.wikimedia.org/T375910)
Awesome, that works fine for my needs.
Thanks!
-- brooke