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

judoscale-sidekiq causing deprecation warnings in sidekiq 7.2.1 #195

Closed
WillRogers727 opened this issue Feb 6, 2024 · 3 comments · Fixed by #196
Closed

judoscale-sidekiq causing deprecation warnings in sidekiq 7.2.1 #195

WillRogers727 opened this issue Feb 6, 2024 · 3 comments · Fixed by #196

Comments

@WillRogers727
Copy link

Since updating sidekiq to v7.2.1 we've been getting a lot of deprecation warnings like this:

/app\/vendor\/bundle\/ruby\/3.2.0\/gems\/judoscale-sidekiq-1.5.3\/lib\/judoscale\/sidekiq\/metrics_collector.rb:24: warning: Direct access to `Sidekiq::Work` attributes is deprecated, please use `#payload`, `#queue`, `#run_at` or `#job` instead/

It appears to be caused by accessing work["payload"] in lib/judoscale/sidekiq/metrics_collector.rb:24

Relevant sidekiq commit: sidekiq/sidekiq@da03008

It should be possible to solve by changing the way of accessing work to work.payload

Let me know if any other info is needed. Thanks!

@WillRogers727 WillRogers727 changed the title judoscale-sidekiq causing deprecation warnings from stripe 7.2.1 judoscale-sidekiq causing deprecation warnings from sidekiq 7.2.1 Feb 6, 2024
@WillRogers727 WillRogers727 changed the title judoscale-sidekiq causing deprecation warnings from sidekiq 7.2.1 judoscale-sidekiq causing deprecation warnings in sidekiq 7.2.1 Feb 6, 2024
@adamlogic
Copy link
Collaborator

Took me a while to repro this because I wasn't seeing the warning output. This article helped a lot: https://www.fastruby.io/blog/exploring-ruby-warnings.html

Starting my process with RUBYOPT="-W2" did the trick.

Anyway, I'm pushing a fix now. Thanks for the report!

@adamlogic
Copy link
Collaborator

Released in v1.5.4

@WillRogers727
Copy link
Author

Released in v1.5.4

Thanks for the quick release! :D

ezekg added a commit to keygen-sh/keygen-api that referenced this issue Feb 8, 2024
ezekg added a commit to keygen-sh/keygen-api that referenced this issue Feb 8, 2024
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

Successfully merging a pull request may close this issue.

2 participants