Repository navigation
fix(integrations): Check retries_left before capturing exception - #3803
sentrivana merged 3 commits into
Conversation
sentrivana
left a comment
There was a problem hiding this comment.
Thank you @malkovro!
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3803 +/- ##
==========================================
+ Coverage 79.87% 79.90% +0.03%
==========================================
Files 137 137
Lines 15371 15373 +2
Branches 2608 2608
==========================================
+ Hits 12277 12284 +7
+ Misses 2223 2221 -2
+ Partials 871 868 -3
|
sentrivana
left a comment
There was a problem hiding this comment.
Looks like we need to make this compatible with older rq versions where the jobs don't have the retries_left attribute, see here: https://github.com/getsentry/sentry-python/actions/runs/11915419148/job/33205698444?pr=3803
Should hopefully be a small change, maybe we can use getattr and make sure if the property is not there, the behavior remains the same as before this change.
Bring back compatibility across rq versions Fixes GH-3707
Since rq/rq#1964 the job status is set to Failed before the handler decides whether to capture or not the exception while
handle_job_failurehas not yet been called so the job is not yet re-scheduled leading to all exceptions getting captured in RQ version >= 2.0.Related to #1076
Fixes #3707