Skip to content

fix(aci): Report Snuba exceptions as warnings and retry #94582

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kcons
Copy link
Member

@kcons kcons commented Jun 27, 2025

Snuba errors are expected and should not be treated as errors; when they occur, we'd like to retry.
We log them as warnings before retry so we still have record of them; if we used @retry for this, it'd report them as high priority and we'd like to avoid that in this context.

@kcons kcons requested a review from a team as a code owner June 27, 2025 22:24
Copy link

sentry-io bot commented Jun 27, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/sentry/workflow_engine/processors/delayed_workflow.py

Function Unhandled Issue
process_delayed_workflows SoftTimeLimitExceeded: SoftTimeLimitExceeded() se...
Event Count: 11
process_delayed_workflows KeyError: 6706913574 sentry.workflow_engine.proce...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 27, 2025
@@ -675,7 +677,7 @@ def repr_keys[T, V](d: dict[T, V]) -> dict[str, V]:
),
),
)
@retry
@retry(exclude=(MaxAttemptsExceededError,))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also exclude NoRetriesRemainingError as well since we are invoking retry_task?

raise NoRetriesRemainingError()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I decided maybe we shouldn't have to wire this up and sent #94580 but neglected to put this pr on ice in the meantime.

@@ -9,6 +9,7 @@

import sentry_sdk
from celery import Task
from celery.exceptions import MaxAttemptsExceededError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 ci seems to not like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oop, fixed that, then accidentally allowed cursor to slop it and didn't notice. Fixed.

Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #94582      +/-   ##
==========================================
- Coverage   85.60%   80.72%   -4.89%     
==========================================
  Files       10384    10384              
  Lines      601676   601673       -3     
  Branches    23408    23408              
==========================================
- Hits       515091   485692   -29399     
- Misses      86129   115525   +29396     
  Partials      456      456              

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants