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

Sidekiq 6.3.0 includes Job module that clashes with sidekiq_unique_ext.rb class Job #651

Closed
kylesnowschwartz opened this issue Nov 9, 2021 · 2 comments

Comments

@kylesnowschwartz
Copy link

Describe the bug
in Sidkiq 6.3.0 (https://my.diffend.io/gems/sidekiq/6.2.0/6.3.1) the class Job was renamed to class JobRecord and a new module Job was added as an alias.

When requiring both

require 'sidekiq'
require "sidekiq-unique-jobs"

I now get the following error in my application

TypeError:
  Job is not a class
  /usr/local/bundle/ruby/2.7.0/gems/sidekiq-6.3.1/lib/sidekiq/job.rb:12: previous definition of Job was here
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:72:in `<module:Sidekiq>'
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:8:in `<top (required)>'
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq_unique_jobs.rb:71:in `require'
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq_unique_jobs.rb:71:in `<top (required)>'
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq-unique-jobs.rb:3:in `require'
# /usr/local/bundle/ruby/2.7.0/gems/sidekiq-unique-jobs-7.1.5/lib/sidekiq-unique-jobs.rb:3:in `<top (required)>'

When running the test suite.

Expected behavior

require 'sidekiq'
require "sidekiq-unique-jobs"

Can be required together without type error clashes

Current behavior
Requiring sidekiq version 6.3.0 and above and sidekiq-uniq-jobs 7.1.5 is raising an error in my application.

Additional Context
The require statements are included in my spec_helper file to assist with booting the application when running our test suite in a dockerized environment.

Please let me know how I can help or if there's any other information I can provide to address this issue!

@mhenrixon
Copy link
Owner

Upgrade to the latest gem version

@kylesnowschwartz
Copy link
Author

Ack! Apologies @mhenrixon I thought I was already on the latest version. Appreciate the quick response, and again, my apologies.

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

No branches or pull requests

2 participants