Skip to content
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

feat: track exceptions in :async activejob adapter #503

Merged
merged 9 commits into from
Dec 4, 2023

Conversation

halfbyte
Copy link
Contributor

@halfbyte halfbyte commented Oct 25, 2023

Fixes #361

I have some doubts about this but I wanted to give it a shot.

  • I am not 100% sure if the way this is installed will work with all of the various loader configurations
  • I am not sure if I have set up the call to .notify correctly and if my usage of .flush is correct.
  • I am not 100% sure if this would survive a user installing additional callbacks (I will try to add a test for that)
  • Due to the way ActiveJob testing works, I'm not actually testing the :async adapter (I don't think that that's a huge problem as I am not monkeypatching anything)

Please have a look.

@halfbyte halfbyte requested a review from joshuap October 25, 2023 07:20
Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me, assuming it works in a live Rails app. 😁

I left a question about the test harness.

spec/integration/rails/async_queue_adapter_spec.rb Outdated Show resolved Hide resolved
@joshuap joshuap requested a review from subzero10 October 30, 2023 21:35
@halfbyte
Copy link
Contributor Author

halfbyte commented Nov 6, 2023

@joshuap I've removed the :sync and the flush block, as I think both of them are not strictly necessary after reading your explanations. I should've looked at these options a bit more when copying the code over :)

I've also simplified the test and tested it in a rails app from the console.

@halfbyte halfbyte requested a review from joshuap November 6, 2023 15:59
Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

This is looking much better! Just one last question.

lib/honeybadger/plugins/active_job.rb Show resolved Hide resolved
@halfbyte halfbyte requested a review from joshuap November 27, 2023 11:38
Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

:shipit:

@halfbyte
Copy link
Contributor Author

@subzero10 Can I merge this?

@joshuap
Copy link
Member

joshuap commented Dec 1, 2023

I'm good with merging this 👍

@subzero10
Copy link
Member

Sure go ahead!

@halfbyte halfbyte merged commit 9a6e2ec into master Dec 4, 2023
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ActiveJob default backend integration
3 participants