Replies: 18 comments 4 replies
-
This is going to be a major breaking change. Most addons of Sidekiq will need to be updated to work with the next version. Can you explain what the net negative in the term 'worker' ? |
Beta Was this translation helpful? Give feedback.
-
I know, the plan is to have a very long backward compatibility period. Ideally we make migration as simple as search/replace "Sidekiq::Worker" -> "Sidekiq::Job". My initial thought is:
Restoring compatibility is as simple as "worker" is ambiguous, people use it to refer to processes ("I started a new worker"), types of jobs, executing threads ("I've got 10 workers"), jobs ("I enqueued 10 workers"), etc. It's a mess. Does that make more sense? |
Beta Was this translation helpful? Give feedback.
-
The only major issue I've seen so far is that ActiveJob owns the |
Beta Was this translation helpful? Give feedback.
-
Hmm, I think this change will cause a major refactoring effort , a lot of gems reference to that module. For folder naming, if i had to not use app/workers and since we agreed that app/jobs if for ActiveJob wrappers, i will use app/async_tasks or app/sidekiq_tasks. |
Beta Was this translation helpful? Give feedback.
-
I appreciate this feedback, you always have good advice. I do want to create and document Sidekiq::Job. You are right that we can't realistically drop Sidekiq::Worker anytime soon, possibly forever. I will make the changes to use Sidekiq::Job everywhere but I will keep Sidekiq::Worker as a supported public API for the foreseeable future. |
Beta Was this translation helpful? Give feedback.
-
Plan is to release 6.2.3 tomorrow without Sidekiq::Job. 6.3.0 will contain Sidekiq::Job, which will simply be an alias for Sidekiq::Worker. |
Beta Was this translation helpful? Give feedback.
-
The alias is not a breaking change, so we could start testing it from 6.2.3 unofficially. Officially it will be 6.3.0. wdyt ? |
Beta Was this translation helpful? Give feedback.
-
The issue is that the Sidekiq API currently has a helper class called Sidekiq::Job so I had to refactor the API a bit. That refactor is a breaking change for any scripts that referenced that class. It's not a major or documented API but it's still breaking so I thought it better to introduce it in a minor version bump, not a patch. |
Beta Was this translation helpful? Give feedback.
-
Maybe it's probably better to introduce the breaking change now so people can fix their scripts and then introduce the new Sidekiq::Job alias in a future release? |
Beta Was this translation helpful? Give feedback.
-
Latest plan:
|
Beta Was this translation helpful? Give feedback.
-
@mperham sorry to comment here , but can you enable Discussions in this repo https://github.com/mperham/sidekiq/settings. We could use it instead of have issues opened. |
Beta Was this translation helpful? Give feedback.
-
Sure, we can try it out. |
Beta Was this translation helpful? Give feedback.
-
Looks like Afaik a manual Shouldn't it be a non breaking change for a minor release and maybe break on Edit: Or it got renamed to |
Beta Was this translation helpful? Give feedback.
-
Refactoring can change undocumented internal classes, even in patch releases. Sidekiq::Job was an undocumented API class, it was renamed to Sidekiq::JobRecord. |
Beta Was this translation helpful? Give feedback.
-
Correct, we removed Sidekiq::Job in this release so we can introduce a new module with that name in 6.3. Effectively we want to break everyone using it today because in 6.3.0, Sidekiq::Job will be completely different. |
Beta Was this translation helpful? Give feedback.
-
This should have come with a bigger warning! We started seeing |
Beta Was this translation helpful? Give feedback.
-
Suggest that this change should increment the minor version. We just attempted to update from 6.2.0 to 6.2.2 - this is not a simple backward compatible "bug fix". |
Beta Was this translation helpful? Give feedback.
-
@mperham should we add a post install message ? I can submit a PR |
Beta Was this translation helpful? Give feedback.
-
The term
worker
within the Sidekiq ecosystem is a net negative. Replace instances in the wiki and codebase with more precise terminology, e.g.Sidekiq::Worker -> Sidekiq::Job
worker -> process, thread, job depending on context
Beta Was this translation helpful? Give feedback.
All reactions