A routine gem update ended up creating $73k worth of subscriptions
SerpApi dev here. I've requested, reviewed, tested, and deployed this upgrade of gems.<p>I want to clarify some things. This code was running on staging for three weeks before the deployment to production. There were four application errors on staging that were related to the problem with subscription renewals.<p>I and the author of the pull request have made three mistakes:<p>- haven't carefully read code in all methods from the backtrace of four app errors on a staging environment<p>- upgraded several gems at once<p>- didn't review the changelog of mongoid gem<p>As multiple people commented here, integration tests for renewals should've been caught that bug. We <i>hadn't</i> a test case when all user's subscriptions are checked after the renewal of a specific test user.<p>So the lesson here is to <i>not yolo minor upgrades of dependencies</i> and avoid mistakes above.