From f464f36f152463a8f8af5a5d0d7d9ac0b8ebbc0b Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Sat, 31 Dec 2016 14:42:52 -0800 Subject: [PATCH] Start 5.0 branch --- 5.0-Upgrade.md | 43 ++++++++++++++++++++++++++++++++++++++++++ lib/sidekiq/version.rb | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 5.0-Upgrade.md diff --git a/5.0-Upgrade.md b/5.0-Upgrade.md new file mode 100644 index 00000000..5d7706f2 --- /dev/null +++ b/5.0-Upgrade.md @@ -0,0 +1,43 @@ +# Welcome to Sidekiq 5.0! + +Sidekiq 5.0 contains a reworked job dispatch and execution core to integrate +better with the new Rails 5.0 Executor. + +## What's New + +* Integrate the job logging and retry logic directly in with the job + execution logic in Sidekiq::Processor. Previously this logic was + defined as middleware. Rails's Executor handles ActiveRecord + connection management, job callbacks, development mode class loading, + etc. Because of its extensive responsibilities, the Executor can't be + integrated as Sidekiq middleware; the logging/retry logic had to be pulled out + too. Sidekiq 4.2 had a hack to make it work but this redesign provides + a cleaner integration. + +* The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are + no longer available by default. The extensions allow you to marshal + job arguments as YAML, leading to cases where job payloads could be many + 100s of KB or larger if not careful, leading to Redis networking + timeouts or other problems. As noted in the Best Practices wiki page, + Sidekiq is designed for jobs with small, simple arguments. + + Add this line to your initializer to re-enable them and get the old behavior: +```ruby +Sidekiq::Extensions.enable_delay! +``` + The old `Sidekiq.remove_delay!` API has been removed as it is now the default. + +## Upgrade + +As always, please upgrade Sidekiq **one major version at a time**. +If you are already running Sidekiq 4.x, then: + +* Upgrade to the latest Sidekiq 4.x. +```ruby +gem 'sidekiq', '< 5' +``` +* Fix any deprecation warnings you see. +* Upgrade to 5.x. +```ruby +gem 'sidekiq', '< 6' +``` diff --git a/lib/sidekiq/version.rb b/lib/sidekiq/version.rb index 70f67f36..4c50fa5e 100644 --- a/lib/sidekiq/version.rb +++ b/lib/sidekiq/version.rb @@ -1,4 +1,4 @@ # frozen_string_literal: true module Sidekiq - VERSION = "4.2.8" + VERSION = "5.0.0" end