Repository navigation
ref(seer): Move Seer credit checks to a dedicated backend - #129598
Merged
Merged
Conversation
Seer credit checks went through the quotas backend, which made getsentry implement them in its already overloaded quotas module. Add a SENTRY_SEER_CREDIT swappable backend, like SENTRY_PARTNERSHIPS, so getsentry can implement credit checks in a module of their own. Co-Authored-By: Volo Kluev <[email protected]>
noahsmartin
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seer credit checks go through
quotas.backend.check_seer_credits(added in #129130). That means getsentry has to implement them ingetsentry/quotas.py, which is already overloaded (review comment).This PR adds a dedicated swappable backend,
SENTRY_SEER_CREDIT, built the same way asSENTRY_PARTNERSHIPS:sentry.seer_credit.SeerCreditis the default. Every check passes, which matches the currentQuota.check_seer_creditsdefault.can_run_seer_operationnow callsseer_credit.backend.check_seer_credits.Quota.check_seer_creditsis removed.No user-facing change: credit checks are still behind
organizations:seer-credit-checks, and every backend involved returnshas_enough_credits=True.Follow-up: getsentry/getsentry#22888 implements the backend in
getsentry/seer_credit.pyand setsSENTRY_SEER_CREDIT. Merge this PR first, then that one. In the gap, getsentry'sSubscriptionQuota.check_seer_credits(from getsentry#22885) is no longer called, so the Seer wallet balance-lookup sample pauses until #22888 lands.via volo.
--
View Session [Sentry]