-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Use updated Sidekiq wrapper class name in test #54991
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
base: main
Are you sure you want to change the base?
Conversation
@@ -34,8 +34,14 @@ class QueuingTest < ActiveSupport::TestCase | |||
test "should supply a wrapped class name to Sidekiq" do | |||
Sidekiq::Testing.fake! do | |||
::HelloJob.perform_later | |||
hash = ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper.jobs.first | |||
assert_equal "ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", hash["class"] | |||
if Sidekiq::VERSION >= "8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition will be always true, since we always test on latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 It was late, I was thinking this would be easier to backport, but in any case we don't lock the version of sidekiq afaik so we should just update the name, I guess.
This is due to sidekiq/sidekiq@4d80a26 changing the name used when queueing jobs.
One of the reasons I hesitated to merge this pull request is the note in the Sidekiq changelog stating that “the old name will still work in 8.x.” https://github.com/sidekiq/sidekiq/blob/main/Changes.md?plain=1#L37-L38 Given that, I was expecting the old name I also noticed that similar tests already exist on the Sidekiq side—for example. https://github.com/sidekiq/sidekiq/blob/aee9da68706536fcacbaad069794644f027c3278/test/active_job_adapter_test.rb#L47-L68 So I’m wondering whether we need to keep this integration test in Rails, or if it might be redundant. |
@yahonda I'm on the fence about removing the test, because for historical purposes (i.e. stable branches) it's value is that:
But the actual name is an implementation detail, and not even public API:
So the value of the test is purely internal, iiuc. Meaning we get to choose if we want to maintain it or not. If we do, I can see #55148 as an acceptable alternative to this. |
This is due to sidekiq/sidekiq@4d80a26 changing the name used when queueing jobs.
/cc @yahonda @seuros