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

Take third parameter for Sidekiq error_handler #1136

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

atomaka
Copy link
Contributor

@atomaka atomaka commented Nov 22, 2023

Description of the change

In sidekiq/sidekiq@2870516 Sidekiq starts accepting a the Sidekiq Configuration option as a parameter to error_handlers and marks two parameter handlers as deprecated. The following deprecation notice is now printed when Rollbar handles an exception from Sidekiq:

DEPRECATION: Sidekiq exception handlers now take three arguments, see #<Proc:0x000000011b32c870 /Users/atomaka/.local/share/rtx/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rollbar-3.3.3/lib/rollbar/plugins/sidekiq.rb:15> 

This change adds a third parameter to the handler to accept that configuration and defaults the value to nil since

  1. Older versions of Sidekiq will not pass a third parameter
  2. Rollbar does not need to do anything with that value (yet?)

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

In
sidekiq/sidekiq@2870516
Sidekiq starts accepting a the Sidekiq Configuration option as a
parameter to error_handlers and marks two parameter handlers as
deprecated.  This change adds a third parameter to the handler to accept
that configuration and defaults the value to `nil` since

1. Older versions of Sidekiq will not pass a third parameter
2. Rollbar does not need to do anything with that value (yet?)
Copy link
Contributor

@waltjones waltjones left a comment

Choose a reason for hiding this comment

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

@atomaka thank you for the PR!

@waltjones waltjones merged commit 8c6a9e9 into rollbar:master Nov 27, 2023
25 checks passed
@atomaka atomaka deleted the fix-sidekiq-deprecation branch November 27, 2023 17:15
@bf4
Copy link
Contributor

bf4 commented Dec 7, 2023

Thank you so much for this release!

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.

DEPRECATION: Sidekiq exception handlers now take three arguments
3 participants