sidekiq-worker-killer icon indicating copy to clipboard operation
sidekiq-worker-killer copied to clipboard

sidekiq/util has been removed in 6.5.0

Open bf4 opened this issue 2 years ago • 12 comments

see https://github.com/mperham/sidekiq/compare/v6.4.2...v6.5.0

Follows https://github.com/mperham/sidekiq/pull/5340

bf4 avatar Jun 08 '22 18:06 bf4

I think this broke our sidekiq when I deployed it. Hold on

NoMethodError: undefined method call' for nil:NilClass (Most recent call first) Show 3 non-project frames NoMethodError: undefined method call' for nil:NilClass (Most recent call first)
Hide 4 non-project frames
File /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.5.0/lib/sidekiq/processor.rb line 73 in rescue in run
File /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.5.0/lib/sidekiq/processor.rb line 67 in run
File /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.5.0/lib/sidekiq/component.rb line 8 in watchdog
File /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.5.0/lib/sidekiq/component.rb line 17 in block in safe_thread

bf4 avatar Jun 09 '22 13:06 bf4

Since worker_killer is a server middleware, you should include the new Module as noted here:

https://github.com/mperham/sidekiq/blob/main/docs/middleware.md#updated-api

You can then access the identity with config[:identity]. It looks like that's all you need sidekiq/util for.

mperham avatar Jun 09 '22 16:06 mperham

@mperham Thanks. Updated the PR and added a test for finding the process from the processset for the 'identity' to ensure it doesn't fail again

bf4 avatar Jun 09 '22 18:06 bf4

Why not just have a new version that only supports 6.5+? Let people use an old version of swk if they want to run an old version of Sidekiq.

mperham avatar Jun 09 '22 19:06 mperham

re "Why not just have a new version that only supports 6.5+? Let people use an old version of swk if they want to run an old version of Sidekiq."

I'm not a maintainer of this. 👍 on that, though

bf4 avatar Jun 09 '22 21:06 bf4

Still getting failures. Gotta look deeper. maybe something about the heartbeat? maybe something redis-specific which is why it's not showing up in tests?

https://github.com/klaxit/sidekiq-worker-killer/pull/21#issuecomment-1151124349

looks like somehow Processor is getting a nil @callback

I'm trying to reproduce it locally and get more context

my local gem changes, fwiw

sidekiq 6.4.2 -> 6.5.0 sidekiq-pro 5.3.1 -> 5.5.0

bf4 avatar Jun 10 '22 01:06 bf4

Scout APM’s gem breaks Sidekiq 6.5 with this error, see their issue tracker.

mperham avatar Jun 10 '22 01:06 mperham

@mperham Thanks for that. I thought I might have noticed it on local server shutdown but hadn't reproduced it yet

https://github.com/scoutapp/scout_apm_ruby/issues/449 https://github.com/mperham/sidekiq/issues/5375

bf4 avatar Jun 10 '22 01:06 bf4

Why not just have a new version that only supports 6.5+? Let people use an old version of swk if they want to run an old version of Sidekiq.

It's a bad idea to add breaking changes to minor update, isn't ?

slayer avatar Jun 16 '22 20:06 slayer

Sidekiq::Processor is not a public API nor is sidekiq/util. I take compatibility very seriously for documented, public APIs, deprecate things and document them in major version release notes.

mperham avatar Jun 16 '22 20:06 mperham

Sidekiq::Processor is not a public API nor is sidekiq/util.

so why so many gems were broken? (rhetorical question) :)

slayer avatar Jun 16 '22 20:06 slayer

What needs to be done to merge this and release a new gem version, please?

Laykou avatar Jul 26 '22 21:07 Laykou

@slayer @bf4 is this ready to be merged? If not, how can I help?

pcomans avatar Aug 24 '22 00:08 pcomans

I'm running this fork in prod. I am not a maintainer can't merge or release

bf4 avatar Aug 24 '22 11:08 bf4

@ccyrille Any chance for a new release?

themilkman avatar Sep 01 '22 09:09 themilkman

Released as 1.0.1 @bf4 😃

ccyrille avatar Sep 02 '22 14:09 ccyrille

@ccyrille Sure, I'm up to add some bandwidth in both github and rubygems, if you're up for it. Is really just in maintenance mode anyhow.

bf4 avatar Sep 03 '22 02:09 bf4