-
Notifications
You must be signed in to change notification settings - Fork 2.4k
uninitialized constant Sidekiq::Component after upgrading from 6.5.1 to 6.5.4 #5462
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
Comments
I bumped into the same issue when running
|
This might come from this commit. The file lib/sidekiq/job_retry.rb was requiring |
Look at the backtrace. The error is coming from sidekiq-status code loading. |
You're right, thanks, I'm blind… |
The class Sidekiq::JobRetry is including |
It is only required in the Sidekiq server process. You cannot load server components in a client process. |
Does this mean there is a bug in |
Yes. They are requiring server components when they shouldn’t.
Sidekiq.configure_server do |config|
require "sidekiq-status/server_middleware"
end
|
In my case, I'm not requiring any server component in client code. I'm trying to test a custom sidekiq logger that uses job_retry. I think the fact that job_retry doesn't require component is a smell, that you can see in sidekiq's own test suite v6.5.1...v6.5.4#diff-f9cb8a684c3b818b3e8866b7fb8a95cea48673d567a810811b531ce4c2bc6d29R4. I see no reason why my test would need to require component other than it is requiring |
That's fair enough. I can see how it's difficult to create an integration test for X if X doesn't require its dependencies. |
So for the rest of us, how do we fix this in 6.5.4? I dont have |
@noctivityinc You open up your own issue with a backtrace and I diagnose it for you. |
@mperham will the patch 9d5a6d7 be included in a 6.5.x series release or 7 directly? thanks
|
That commit is on main which means it will go into 6.5.5. |
Ruby version: 3.1.2
Rails version: 7.0.3.1
Sidekiq / Pro / Enterprise version(s): 6.5.4 (normal version)
OS : Ubuntu 18.04.6 LTS
After upgrading to 6.5.4 and running
bundle exec rails test
, I got this error:Backtrace
sidekiq.yml
Initializer
The text was updated successfully, but these errors were encountered: