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

Logger.broadcast removed from ActiveSupport causing sidekiq to break #6054

Closed
kjellberg opened this issue Sep 26, 2023 · 4 comments
Closed

Comments

@kjellberg
Copy link

Ruby version: 3.2
Rails version: master

The problem

When attempting to run Sidekiq with the latest Rails master branch, the following error is encountered:

core git:(main) ✗ bundle exec sidekiq
undefined method `broadcast' for ActiveSupport::Logger:Class
/Users/rasmus/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/sidekiq-7.1.4/lib/sidekiq/rails.rb:52:in `block (2 levels) in <class:Rails>'
/Users/rasmus/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/sidekiq-7.1.4/lib/sidekiq.rb:98:in `configure_server'
/Users/rasmus/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/sidekiq-7.1.4/lib/sidekiq/rails.rb:47:in `block in <class:Rails>'

This issue seems to be related to changes in ActiveSupport, specifically the removal of the broadcast method in ActiveSupport::Logger.

Steps to reproduce:

  1. Use the latest Rails master branch.
  2. Attempt to run Sidekiq.

Related PR:

See rails/rails#48615

@kjellberg kjellberg changed the title Logger.broadcast removed from ActivSupport causing sidekiq to break Logger.broadcast removed from ActiveSupport causing sidekiq to break Sep 26, 2023
@mperham
Copy link
Collaborator

mperham commented Sep 26, 2023

rails/rails#49389

@fatkodima
Copy link
Member

Encountered the same problem in my gem - fatkodima/online_migrations@9460c2b.

mperham added a commit that referenced this issue Sep 27, 2023
mperham added a commit that referenced this issue Sep 27, 2023
* Move filtering into OSS so we can use it with Metrics too

* extract english strings

* changes

* wording

* minor bump

* Modify inline testing's client override so as to not conflict with batch's client override, fixes #6057

* Previous commit fixes #6054

* tweaks
@drale2k
Copy link

drale2k commented Sep 30, 2023

Having this issue with 7.1.0.rc1, which means this will make it into the 7.1 release. Is there any quick workaround from Sidekiqs side, so i don't have to downgrade Rails?

Update: Oh nevermind, just saw that a fix was merged to main, awesome 👍🏻

@billyabm
Copy link

in my case, I solved this issue using sidekiq7.2.2

gem 'sidekiq', '~> 7.2.2'

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 a pull request may close this issue.

5 participants