Repository navigation
feat(seer-billing): Handle SeerOutOfCreditsException at Autofix callers #130284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cbdde3a
c247328
12cebaf
e2855ba
33f5287
d70d6cb
56c7833
58a1b63
8856cd4
da71d66
c49f7ed
8e5ca8f
d2ef51a
0ab3b10
5cecd74
8552e64
69f5488
0f648e8
a3dae0d
f738ddf
bdac9ed
94b979c
302de4f
eae815f
0ec42da
6f7cb6f
52c156d
9248e4c
e35a52c
99eb2ac
b8824e4
e8f415e
a1a9540
396779d
783742c
3c0d97b
90c5db5
ff4faae
f7c9960
2b31435
b86335d
245aca9
80bba23
914a60c
df89e79
28e5990
766bc10
6c0043d
1c7c190
a502768
8a11dd1
c787f4d
4e289d3
21285b1
451f3bd
ab0d0aa
f271a38
89bdfdc
8888ed6
5971753
5e7ccfc
1a78b12
66d497e
de5b2ab
d102d4a
6df4d36
f6ca995
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -209,7 +209,7 @@ def trigger_autofix_agent( | |
| trigger_autofix_agent, | ||
| trigger_push_changes, | ||
| ) | ||
| from sentry.seer.autofix.exceptions import NoSeerQuotaException | ||
| from sentry.seer.autofix.exceptions import NoSeerQuotaException, SeerOutOfCreditsException | ||
| from sentry.seer.autofix.feature.models import FEATURE_ID as AUTOFIX_FEATURE_ID | ||
| from sentry.seer.autofix.steps import AutofixStep | ||
|
|
||
|
|
@@ -313,6 +313,16 @@ def trigger_autofix_agent( | |
| self.entrypoint.on_trigger_autofix_error(error=error) | ||
| lifecycle.record_failure(failure_reason=error) | ||
| return | ||
| except SeerOutOfCreditsException: | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coordination note for the Slack tickets. This PR: If someone clicks an old Slack Autofix button after the org runs out of credits, #130271 adds
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've cut out CW-3080 to track the work to post richer replies for this case. Thanks! |
||
| with SeerOperatorEventLifecycleMetric( | ||
| interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ERROR, | ||
| entrypoint_key=self.entrypoint.key, | ||
| ).capture(): | ||
| self.entrypoint.on_trigger_autofix_error( | ||
| error="Your organization does not have enough Seer credits" | ||
| ) | ||
| lifecycle.record_halt(halt_reason="not_enough_seer_credits") | ||
| return | ||
| except Exception as e: | ||
| with SeerOperatorEventLifecycleMetric( | ||
| interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ERROR, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.