<div dir="ltr">Hi,<div><div><br></div><div>As you may or not have noticed, in recent weeks there's a scap plugin available for MediaWiki deployments. I wanted to give everyone a quick heads up on this.</div><div><br></div><div>`scap clean` is a plugin that I wrote that automates the *incredibly* messy and time-consuming process of cleaning up obsolete branches of MediaWiki from production. A couple of big reasons why we want this:</div><div>- Stop wasting space</div><div>- Stop wasting time in rsync on dumb stuff</div><div>- Have the deployed directories mirror what we actually care about (sanity)</div><div><br></div><div>Ok, so we had a bunch of dsh commands that did this...it was ugly and required copy+pasting every single week. Now: if you're wanting to cleanup, it's as simple as:</div><div><br></div><div>`scap cleanup 1.29.0-wmf.4`</div><div><br></div><div>This does a couple of things</div><div>1) Prunes old wmf/* branches from Gerrit (yay finally automated cleanup!)</div><div>2) Prunes the directory from /srv/mediawiki-staging/* on the active master</div><div>3) Prunes the directory from /srv/mediawiki/* on all apaches (masters, debug, etc)</div><div>4) Prunes the junk l10nupdate cache files (/var/cache/l10nupdate/*) that were **never** being cleaned up before</div><div><br></div><div>(4) especially has bit us in the past with causing tin/mira to run out of disk space. Additionally, you may see a --keep-static option. This is for soon-to-be-dead branches where we only care about static assets (CSS/JS/images/etc) but the PHP is not being executed. --keep-static will prune the non-static assets, clean the l10nupdate cache, and still keep the branch intact (we go from ~4.4GB -> ~30MB when we go static-only!)</div><div><br></div><div>Basically, a branch gets `scap clean` run twice: once when it goes out of service with --keep-static, and a second time a few weeks later when we really don't want it anymore.</div><div><br></div><div>Sooooo, all this being said: you probably won't ever need/want to run this. But I wanted to make sure everyone knew what it does, just in case they saw it and was curious. And don't worry, I have safeguards to keep you from accidentallying the active branches ;-)</div><div><br></div><div>-Chad</div></div></div>