With MediaWiki at the WMF moving to Kubernetes, it's now time to start running manual maintenance scripts there. The old way will continue working for a little while, but it will be going away. Note that while the announcement is only for "manual maintenance scripts", it's probably safe to assume invoking mwscript from other scripts that invoke mwscript falls under a similar umbrella.
Notable changes:
- mwscript-k8s does not, by default, wait for completion before returning
- mwscript-k8s does not, by default, print the script output
Possible remediations::
- mwscript-k8s includes a --follow flag which stream the logs. Does not propagate the return code. Note that this does provide output beyond what the script did, but it comes over stderr instead of stdout and should be ignorable.
- Maybe ExpectedIndices.php could be provided via api? There is nothing secret in there, it simply seemed odd to expose to the public api since it's entirely operational in nature.
Problematic places include:
- cirrus-reindex-orchestrator - in gitlab/repos/search-platform/cirrus-reindex-orchestrator
- invokes ExpectedIndices for all wikis and expects to read the json formatted result
- invokes UpdateOneSearchIndexConfig. Expects the call to delay until completion, and for the exit code to indicate one of three possible outcomes of the requested index update.
- cleanup_weighted_tags.py - in CirrusSearch repo
- invokes ExpectedIndices for all wikis and expects to read the json formatted result
- check_indices.py - in CirrusSearch repo
- invokes ExpectedIndices for all wikis and expects to read the json formatted result
- dumpcirrussearch.sh - in puppet
- Invokes DumpIndex.php and expects the return code to indicate success or failure. Additionally expects the call to not return until complete, as it will start another dump immediately after.
- This is not the only dumps script using mwscript, we may be able to lean on whatever solution is found for the rest of the dumps and timers.