Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[active_job] support exception reporting only after last retry failed #2573

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

solnic
Copy link
Collaborator

@solnic solnic commented Mar 5, 2025

This is an updated version of #2500 which adds support for active_job_report_after_job_retries option which makes reporting an exception upon a job failure to happen only on the last attempt retry failure.

@solnic solnic force-pushed the solnic/pr-2500-follow-up branch 4 times, most recently from 4ab9ff9 to b26b17a Compare March 6, 2025 13:13
@getsentry getsentry deleted a comment from github-actions bot Mar 7, 2025
@solnic solnic force-pushed the solnic/pr-2500-follow-up branch 2 times, most recently from 90144c4 to 2fa01fc Compare March 7, 2025 14:38
@getsentry getsentry deleted a comment from github-actions bot Mar 7, 2025
@solnic solnic marked this pull request as ready for review March 7, 2025 14:40
@solnic solnic requested review from st0012 and sl0thentr0py March 7, 2025 14:40
@getsentry getsentry deleted a comment from github-actions bot Mar 7, 2025
@solnic solnic force-pushed the solnic/pr-2500-follow-up branch from 2fa01fc to d19050a Compare March 10, 2025 14:07
@solnic solnic changed the title PR 2500 follow up [active_job] support exception reporting only after last retry failed Mar 10, 2025
@solnic solnic force-pushed the solnic/pr-2500-follow-up branch from d19050a to 36c1176 Compare March 11, 2025 14:51
@getsentry getsentry deleted a comment from github-actions bot Mar 11, 2025
@solnic
Copy link
Collaborator Author

solnic commented Mar 11, 2025

Please ignore Danger here, it just fails to see that I added CHANGELOG entry.

Copy link
Collaborator

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

LGTM. Left some suggestions for tests.

@@ -52,6 +54,10 @@
expect(Sentry::Rails::Tracing.subscribed_tracing_events).to be_empty
Sentry::Rails::Tracing.remove_active_support_notifications_patch

if defined?(Sentry::Rails::ActiveJobExtensions)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think with our current setup this will always be true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@st0012 not really, it may or may not be defined, depending on the order of loading files which is pretty much random 🙃

@solnic solnic force-pushed the solnic/pr-2500-follow-up branch from 36c1176 to 4e59569 Compare March 31, 2025 14:36
Copy link

github-actions bot commented Mar 31, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- [active_job] support exception reporting only after last retry failed ([#2573](https://github.com/getsentry/sentry-ruby/pull/2573))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 4e59569

@solnic solnic force-pushed the solnic/pr-2500-follow-up branch from dc38bb6 to 4e59569 Compare March 31, 2025 14:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants