Page MenuHomePhabricator

SmashPig pending db pruner is broken
Closed, ResolvedPublic2 Estimated Story Points

Description

I just found 1.3M rows in the pending db, going back to its inception. Seems that our maintenance job is not a thing.

Event Timeline

Most are paypal. There's a Jenkins config that should be pruning paypal messages after 14 days, but it's possible I screwed up the config matrix.

Ejegg triaged this task as Medium priority.Mar 28 2017, 9:21 PM

Aha! Blame it on the homebrew getopt replacement in MaintenanceBase. For some reason, it treats options as boolean flags if the script doesn't specify a default value. However, the only option that any script actually does want to be a boolean flag is the --help option, added by MaintenanceBase itself. There's a big FIXME at the relevant line. @mepps is tearing out the custom argv parsing and replacing it with getopt.

Change 353383 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/SmashPig@master] Update loadParamsAndArgs to use getOptionKit to fix errors causing T161260

https://gerrit.wikimedia.org/r/353383

Change 353383 had a related patch set uploaded (by Ejegg; owner: Mepps):
[wikimedia/fundraising/SmashPig@master] Update loadParamsAndArgs to use getOptionKit to fix errors causing

https://gerrit.wikimedia.org/r/353383

Change 353383 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig@master] Update loadParamsAndArgs to use getOptionKit to fix errors causing

https://gerrit.wikimedia.org/r/353383

Ejegg set the point value for this task to 2.