Context:
- https://wikitech.wikimedia.org/wiki/Mw-experimental
- https://wikitech.wikimedia.org/wiki/WikimediaDebug#Plaintext_CLI_profile
- T276994: Provide an mwdebug functionality on kubernetes (mw-experimental), T396767: Make mw-experimental production ready, T397498: Deprecate mwdebugXXXX hosts
- T341553: Allow running one-off scripts manually
When SSH-ing to mw-experimental one currenty ends up on the kubernetes host, not the pod where PHP is installed.
This means only files for web requests can be debugged and ad-hoc changed (e.g. via browser or curl), not files executed via maintenance scripts. This was something I would do monthly or so on the mwdebug hosts when debugging something, whether via php MWScript.php eval.php or via an existing maintenance script.
Is there a supported way to start a shell inside the mw-experimental pod?
Use cases:
- Iterate on a draft wmf-config change in /srv/mediawiki/wmf-config and review runtime impact via mwscript eval.php.
- Debug a maintenance script by making ad-hoc changes under /srv/mediawiki/php-/maintenance/ or /srv/mediawiki/php-/extensions/*/maintenance/, and run mwscript something.php.
- Profiling, per https://wikitech.wikimedia.org/wiki/WikimediaDebug#Plaintext_CLI_profile.
- Using a custom dblist file with foreachwikiindblist. Workaround: T401737