chdsbd / kodiak

🔮 A bot to automatically update and merge GitHub PRs
https://kodiakhq.com
GNU Affero General Public License v3.0
1.04k stars 63 forks source link

Only call `get_subscription` if required #718

Closed judahrand closed 3 years ago

judahrand commented 3 years ago

This PR removes the call to get_subscription for self hosted instances. This was causing problems as the get_subscription method instantiates a second Redis connection pool with a pool size defined by USAGE_REPORTING_POOL_SIZE (poor name choice given that it isn't only used when USAGE_REPORTING is True, but I suspect this is just a historical artefact). This second pool could quite easily push users over their hosted Redis connection limits, especially, as the undocumented USAGE_REPORTING_POOL_SIZE defaults to 50.

With this change the second pool is never instantiated if USAGE_REPORTING is False && SUBSCRIPTIONS_ENABLED is False. These are the default values for self hosted instances.

netlify[bot] commented 3 years ago

👷 Deploy request for kodiak-docs pending review. Visit the deploys page to approve it

🔨 Explore the source changes: b6ff491bf7c70152891487892c9223d49567bcfe

netlify[bot] commented 3 years ago

👷 Deploy request for kodiak-dashboard-staging pending review. Visit the deploys page to approve it

🔨 Explore the source changes: b6ff491bf7c70152891487892c9223d49567bcfe

judahrand commented 3 years ago

Container builds aren't my fault 😛

chdsbd commented 3 years ago

Looks good. Thanks for the PR!