_______________________________________________On Tue, May 6, 2025 at 1:17 PM Reuven Lazarus <rlazarus@wikimedia.org> 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. :DThat 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
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/