sidekiq 5.2.8 → 6.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  3. data/.github/workflows/ci.yml +41 -0
  4. data/.gitignore +0 -2
  5. data/.standard.yml +20 -0
  6. data/5.0-Upgrade.md +1 -1
  7. data/6.0-Upgrade.md +72 -0
  8. data/Changes.md +196 -0
  9. data/Ent-2.0-Upgrade.md +37 -0
  10. data/Ent-Changes.md +72 -1
  11. data/Gemfile +12 -11
  12. data/Gemfile.lock +193 -0
  13. data/Pro-5.0-Upgrade.md +25 -0
  14. data/Pro-Changes.md +56 -2
  15. data/README.md +18 -34
  16. data/Rakefile +5 -4
  17. data/bin/sidekiq +26 -2
  18. data/bin/sidekiqload +32 -24
  19. data/bin/sidekiqmon +8 -0
  20. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  21. data/lib/generators/sidekiq/worker_generator.rb +21 -13
  22. data/lib/sidekiq/api.rb +245 -219
  23. data/lib/sidekiq/cli.rb +144 -180
  24. data/lib/sidekiq/client.rb +68 -48
  25. data/lib/sidekiq/delay.rb +5 -6
  26. data/lib/sidekiq/exception_handler.rb +10 -12
  27. data/lib/sidekiq/extensions/action_mailer.rb +13 -22
  28. data/lib/sidekiq/extensions/active_record.rb +13 -10
  29. data/lib/sidekiq/extensions/class_methods.rb +14 -11
  30. data/lib/sidekiq/extensions/generic_proxy.rb +4 -4
  31. data/lib/sidekiq/fetch.rb +29 -30
  32. data/lib/sidekiq/job_logger.rb +45 -7
  33. data/lib/sidekiq/job_retry.rb +62 -61
  34. data/lib/sidekiq/launcher.rb +112 -54
  35. data/lib/sidekiq/logger.rb +166 -0
  36. data/lib/sidekiq/manager.rb +11 -13
  37. data/lib/sidekiq/middleware/chain.rb +15 -5
  38. data/lib/sidekiq/middleware/i18n.rb +5 -7
  39. data/lib/sidekiq/monitor.rb +133 -0
  40. data/lib/sidekiq/paginator.rb +18 -14
  41. data/lib/sidekiq/processor.rb +71 -70
  42. data/lib/sidekiq/rails.rb +29 -37
  43. data/lib/sidekiq/redis_connection.rb +50 -48
  44. data/lib/sidekiq/scheduled.rb +28 -29
  45. data/lib/sidekiq/sd_notify.rb +149 -0
  46. data/lib/sidekiq/systemd.rb +24 -0
  47. data/lib/sidekiq/testing/inline.rb +2 -1
  48. data/lib/sidekiq/testing.rb +35 -24
  49. data/lib/sidekiq/util.rb +17 -16
  50. data/lib/sidekiq/version.rb +2 -1
  51. data/lib/sidekiq/web/action.rb +14 -10
  52. data/lib/sidekiq/web/application.rb +74 -72
  53. data/lib/sidekiq/web/csrf_protection.rb +156 -0
  54. data/lib/sidekiq/web/helpers.rb +97 -77
  55. data/lib/sidekiq/web/router.rb +18 -17
  56. data/lib/sidekiq/web.rb +53 -53
  57. data/lib/sidekiq/worker.rb +126 -102
  58. data/lib/sidekiq.rb +69 -44
  59. data/sidekiq.gemspec +15 -16
  60. data/web/assets/javascripts/application.js +25 -27
  61. data/web/assets/javascripts/dashboard.js +4 -23
  62. data/web/assets/stylesheets/application-dark.css +149 -0
  63. data/web/assets/stylesheets/application.css +28 -6
  64. data/web/locales/de.yml +14 -2
  65. data/web/locales/en.yml +2 -0
  66. data/web/locales/fr.yml +3 -3
  67. data/web/locales/ja.yml +4 -1
  68. data/web/locales/lt.yml +83 -0
  69. data/web/locales/pl.yml +4 -4
  70. data/web/locales/ru.yml +4 -0
  71. data/web/locales/vi.yml +83 -0
  72. data/web/views/_job_info.erb +2 -1
  73. data/web/views/busy.erb +8 -3
  74. data/web/views/dead.erb +2 -2
  75. data/web/views/layout.erb +1 -0
  76. data/web/views/morgue.erb +5 -2
  77. data/web/views/queue.erb +10 -1
  78. data/web/views/queues.erb +9 -1
  79. data/web/views/retries.erb +5 -2
  80. data/web/views/retry.erb +2 -2
  81. data/web/views/scheduled.erb +5 -2
  82. metadata +31 -49
  83. data/.circleci/config.yml +0 -61
  84. data/.github/issue_template.md +0 -11
  85. data/.travis.yml +0 -11
  86. data/bin/sidekiqctl +0 -20
  87. data/lib/sidekiq/core_ext.rb +0 -1
  88. data/lib/sidekiq/ctl.rb +0 -221
  89. data/lib/sidekiq/logging.rb +0 -122
  90. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 736ce0e629bd4a115422342ccb49c3cf8199372ced62e0bb0a9463974d2cb6cd
4
- data.tar.gz: 60857bf5d87f618ece94183f4553636ae6221f567ada9489da82bbbbd88e0930
3
+ metadata.gz: eafcca9d632a83e39c7e69e47d104493f32b07974d58724347181ea1d9c47511
4
+ data.tar.gz: '08b987ddd7686f813f29a24d9d9027093f97307e7a22e24c355ed8b3d4c49362'
5
5
  SHA512:
6
- metadata.gz: 363885cb52ed06abe653a9fbb6627e9931064fc7d3c607d605a2c915ff2e2ef236c1afd15d22e29a2ee11807f9682fd404c324a24fcd0163637a89f7b0d97458
7
- data.tar.gz: b772dbcd3a911a7a2e48cc75c51f996e59aeca84372188f14972ded218c56a11457e0b3fbd715f28f4c5a2e5b88ededf0ece59933a2e5a2cdb64815d96a02c06
6
+ metadata.gz: 615b18ce20c57301cb4117e6fbeab847b6ba41377ed1ba22d98e32e2df579f1cef1138b0c2757a51a988b0ecef83e47992754fbdb5b96a6f6d653a294755e36c
7
+ data.tar.gz: c3f3a44a85fc7a1c9405f59bba34842892c8a23e49a3ebac8dce5ba35b48738a9c5ba71635b671d2c6b9b711e5692d780a71ebf4a0b3c66ba8ac95c8ab9f319b
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Ruby version:
11
+ Rails version:
12
+ Sidekiq / Pro / Enterprise version(s):
13
+
14
+ Please include your initializer, sidekiq.yml, and any error message with the full backtrace.
15
+
16
+ If you are using an old version, have you checked the changelogs to see if your issue has been fixed in a later version?
17
+
18
+ https://github.com/mperham/sidekiq/blob/master/Changes.md
19
+ https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
20
+ https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: [2.5, 2.6, 2.7]
18
+ services:
19
+ redis:
20
+ image: redis
21
+ options: >-
22
+ --health-cmd "redis-cli ping"
23
+ --health-interval 10s
24
+ --health-timeout 5s
25
+ --health-retries 5
26
+ ports:
27
+ - 6379:6379
28
+
29
+ steps:
30
+ - uses: actions/checkout@v2
31
+ - name: Set up Ruby
32
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
33
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ bundler-cache: true
37
+ ruby-version: ${{ matrix.ruby }}
38
+ - name: Install dependencies
39
+ run: bundle install
40
+ - name: Run tests
41
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -1,8 +1,6 @@
1
1
  .rvmrc
2
2
  .ruby-version
3
3
  tags
4
- Gemfile.lock
5
- gemfiles/*.lock
6
4
  *.swp
7
5
  dump.rdb
8
6
  .rbx
data/.standard.yml ADDED
@@ -0,0 +1,20 @@
1
+ ruby_version: 2.5.0
2
+ fix: false
3
+ parallel: true
4
+ ignore:
5
+ - test/**/*
6
+ - examples/**/*
7
+ - myapp/**/*
8
+ - 'lib/sidekiq.rb':
9
+ - Lint/InheritException
10
+ - 'lib/sidekiq/extensions/**/*':
11
+ - Style/MethodMissingSuper
12
+ - Style/MissingRespondToMissing
13
+ - 'lib/**/*':
14
+ - Naming/AsciiIdentifiers
15
+ - Lint/RescueException
16
+ - Security/YAMLLoad
17
+ - Naming/AccessorMethodName
18
+ - Naming/MethodName
19
+ - Style/GlobalVars
20
+ - Style/Alias
data/5.0-Upgrade.md CHANGED
@@ -14,7 +14,7 @@ versions of Ruby and Rails and adds support for RTL languages in the Web UI.
14
14
  integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
15
15
  too. Sidekiq 4.2 had a hack to make it work but this redesign provides
16
16
  a cleaner integration. [#3235]
17
- * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
17
+ * The Delayed Extensions `delay`, `delay_for` and `delay_until` APIs are
18
18
  no longer available by default. The extensions allow you to marshal
19
19
  job arguments as YAML, leading to cases where job payloads could be many
20
20
  100s of KB or larger if not careful, leading to Redis networking
data/6.0-Upgrade.md ADDED
@@ -0,0 +1,72 @@
1
+ # Welcome to Sidekiq 6.0!
2
+
3
+ Sidekiq 6.0 contains some breaking changes which streamline proper operation
4
+ of Sidekiq. It also drops support for EOL versions of Ruby and Rails.
5
+
6
+ ## What's New
7
+
8
+ This release has major breaking changes. Read and test carefully in production.
9
+
10
+ - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
+ features/internals like the retry subsystem. Prefer the native
12
+ Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
13
+ (requires Rails 6.0.2)
14
+ ```ruby
15
+ class MyJob < ActiveJob::Base
16
+ queue_as :myqueue
17
+ sidekiq_options retry: 10, backtrace: 20
18
+ def perform(...)
19
+ end
20
+ end
21
+ ```
22
+ - Logging has been redesigned to allow pluggable formatters and several
23
+ formats ship with Sidekiq:
24
+ * default - your typical output on macOS
25
+ * heroku - enabled specifically when running in Heroku
26
+ * json - a JSON format for search indexing, one hash per line
27
+
28
+ Sidekiq will enable the best formatter for the detected environment but
29
+ you can override it by configuring the log formatter explicitly. See
30
+ 'sidekiq/logger' for implementation details.
31
+
32
+ ```ruby
33
+ Sidekiq.configure_server do |config|
34
+ config.log_formatter = AcmeCorp::PlainLogFormatter.new
35
+ # config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
36
+ end
37
+ ```
38
+ Please see the [Logging](https://github.com/mperham/sidekiq/wiki/Logging) wiki page for the latest documentation and notes.
39
+ - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
40
+ I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
41
+ how modern services should be managed with a proper init system.
42
+ Managing services manually is more error-prone, let your operating system do it for you.
43
+ systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.
44
+ - **Validate proper usage of the `REDIS_PROVIDER` variable.**
45
+ This variable is meant to hold the name of the environment
46
+ variable which contains your Redis URL, so that you can switch Redis
47
+ providers quickly and easily with a single variable change. It is not
48
+ meant to hold the actual Redis URL itself. If you want to manually set
49
+ the Redis URL then you may set `REDIS_URL` directly. [#3969]
50
+ - **Increase default shutdown timeout from 8 seconds to 25 seconds.**
51
+ Both Heroku and ECS now use 30 second shutdown timeout
52
+ by default and we want Sidekiq to take advantage of this time. If you
53
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
54
+ get the old behavior. [#3968]
55
+ * **Rails <5** is no longer supported. Rails 6+ only works in zeitwerk mode.
56
+ * **Ruby <2.5** is no longer supported.
57
+ * **Redis <4** is no longer supported.
58
+
59
+ ## Upgrade
60
+
61
+ As always, please upgrade Sidekiq **one major version at a time**.
62
+ If you are already running Sidekiq 5.x, then:
63
+
64
+ * Upgrade to the latest Sidekiq 5.x.
65
+ ```ruby
66
+ gem 'sidekiq', '< 6'
67
+ ```
68
+ * Fix any deprecation warnings you see.
69
+ * Upgrade to 6.x.
70
+ ```ruby
71
+ gem 'sidekiq', '< 7'
72
+ ```
data/Changes.md CHANGED
@@ -2,6 +2,202 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
4
 
5
+ 6.1.3
6
+ ---------
7
+
8
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
9
+ - Add process RSS on the Busy page [#4717]
10
+
11
+ 6.1.2
12
+ ---------
13
+
14
+ - Improve readability in dark mode Web UI [#4674]
15
+ - Fix Web UI crash with corrupt session [#4672]
16
+ - Allow middleware to yield arguments [#4673, @eugeneius]
17
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
18
+
19
+ 6.1.1
20
+ ---------
21
+
22
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
23
+ - Fix "check all" JS logic in Web UI [#4619]
24
+
25
+ 6.1.0
26
+ ---------
27
+
28
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
29
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
30
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
31
+ - Better error messages in Sidekiq::Client [#4549]
32
+ - Remove rack-protection, reimplement CSRF protection [#4588]
33
+ - Require redis-rb 4.2 [#4591]
34
+ - Update to jquery 1.12.4 [#4593]
35
+ - Refactor internal fetch logic and API [#4602]
36
+
37
+ 6.0.7
38
+ ---------
39
+
40
+ - Refactor systemd integration to work better with custom binaries [#4511]
41
+ - Don't connect to Redis at process exit if not needed [#4502]
42
+ - Remove Redis connection naming [#4479]
43
+ - Fix Redis Sentinel password redaction [#4499]
44
+ - Add Vietnamese locale (vi) [#4528]
45
+
46
+ 6.0.6
47
+ ---------
48
+
49
+ - **Integrate with systemd's watchdog and notification features** [#4488]
50
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
51
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
52
+ - Fix edge case where a job can be pushed without a queue.
53
+ - Flush job stats at exit [#4498]
54
+ - Check RAILS_ENV before RACK_ENV [#4493]
55
+ - Add Lithuanian locale [#4476]
56
+
57
+ 6.0.5
58
+ ---------
59
+
60
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
61
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
62
+ - Fix Ruby 2.7 warnings [#4412]
63
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
64
+
65
+ 6.0.4
66
+ ---------
67
+
68
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
69
+ - Sidekiq Pro users will now see a Pause button next to each queue in
70
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
71
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
72
+
73
+
74
+ 6.0.3
75
+ ---------
76
+
77
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
78
+ invalid `at` values in the job payloads [#4321]
79
+
80
+ 6.0.2
81
+ ---------
82
+
83
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
84
+ - More internal refactoring and performance tuning [fatkodima]
85
+
86
+ 6.0.1
87
+ ---------
88
+
89
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
90
+ 4269, fatkodima]
91
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
92
+ fatkodima, silent-e]
93
+ - **Job-specific log levels**, allowing you to turn on debugging for
94
+ problematic workers. [fatkodima, #4287]
95
+ ```ruby
96
+ MyWorker.set(log_level: :debug).perform_async(...)
97
+ ```
98
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
99
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
100
+ teams/people responsible for jobs, additional metadata, etc.
101
+ Tags are shown on different pages with job listings. Sidekiq Pro users
102
+ can filter based on them [fatkodima, #4280]
103
+ ```ruby
104
+ class MyWorker
105
+ include Sidekiq::Worker
106
+ sidekiq_options tags: ['bank-ops', 'alpha']
107
+ ...
108
+ end
109
+ ```
110
+ - Fetch scheduled jobs in batches before pushing into specific queues.
111
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
112
+ ```
113
+ ScheduledSet with 10,000 jobs
114
+ Before: 56.6 seconds
115
+ After: 39.2 seconds
116
+ ```
117
+ - Compress error backtraces before pushing into Redis, if you are
118
+ storing error backtraces, this will halve the size of your RetrySet
119
+ in Redis [fatkodima, #4272]
120
+ ```
121
+ RetrySet with 100,000 jobs
122
+ Before: 261 MB
123
+ After: 129 MB
124
+ ```
125
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
126
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
127
+ than standard iteration using each. [fatkodima, #4262]
128
+ ```ruby
129
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
130
+ job.retry
131
+ end
132
+ ```
133
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
134
+ support, approx 10x faster. [fatkodima, #4259]
135
+ ```
136
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
137
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
138
+ ```
139
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
140
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
141
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
142
+ ```ruby
143
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
144
+ ```
145
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
146
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
147
+ ```ruby
148
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
149
+ ```
150
+ - Add `sidekiqmon` to gemspec executables [#4242]
151
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
152
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
153
+
154
+ 6.0
155
+ ---------
156
+
157
+ This release has major breaking changes. Read and test carefully in production.
158
+
159
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
160
+ features/internals like the retry subsystem. [#4213, pirj]
161
+ ```ruby
162
+ class MyJob < ActiveJob::Base
163
+ queue_as :myqueue
164
+ sidekiq_options retry: 10, backtrace: 20
165
+ def perform(...)
166
+ end
167
+ end
168
+ ```
169
+ - Logging has been redesigned to allow for pluggable log formatters:
170
+ ```ruby
171
+ Sidekiq.configure_server do |config|
172
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
173
+ end
174
+ ```
175
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
176
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
177
+ variable. This variable is meant to hold the name of the environment
178
+ variable which contains your Redis URL, so that you can switch Redis
179
+ providers quickly and easily with a single variable change. It is not
180
+ meant to hold the actual Redis URL itself. If you want to manually set
181
+ the Redis URL (not recommended as it implies you have no failover),
182
+ then you may set `REDIS_URL` directly. [#3969]
183
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
184
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
185
+ by default and we want Sidekiq to take advantage of this time. If you
186
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
187
+ get the old behavior. [#3968]
188
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
189
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
190
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
191
+ more resources.
192
+ - Integrate the StandardRB code formatter to ensure consistent code
193
+ styling. [#4114, gearnode]
194
+
195
+ 5.2.9
196
+ ---------
197
+
198
+ - Release Rack lock due to a cascade of CVEs. [#4566]
199
+ Pro-tip: don't lock Rack.
200
+
5
201
  5.2.8
6
202
  ---------
7
203
 
@@ -0,0 +1,37 @@
1
+ # Welcome to Sidekiq Enterprise 2.0!
2
+
3
+ Sidekiq Enterprise 2.0 adds a few new features and adds the requirement that license
4
+ credentials be available at runtime. Note that Sidekiq 6.0 does have major breaking changes.
5
+
6
+ ## What's New
7
+
8
+ * Sidekiq Enterprise now requires license credentials at runtime. If you
9
+ configured Bundler as described in the access email you need do
10
+ nothing, everything should just work. If you are vendoring Sidekiq
11
+ Enterprise you will need to configure Bundler also or set
12
+ `SIDEKIQ_ENT_USERNAME=abcdef12 bundle exec sidekiq...` when starting the
13
+ process. [#4232]
14
+ * Dead jobs now release any unique locks they were holding when they died [#4162]
15
+ * Backoff can now be customized per rate limiter by passing in a Proc [#4219]
16
+ ```ruby
17
+ limiter = Sidekiq::Limiter.bucket(:stripe, 10, :second, backoff: ->(limiter, job) {
18
+ return job['overrated'] || 5 # wait for N seconds, where N is the number of
19
+ # times we've failed the rate limit
20
+ })
21
+ ```
22
+ * Removed deprecated APIs and warnings.
23
+ * Various changes for Sidekiq 6.0
24
+ * Requires Ruby 2.5+ and Redis 4.0+
25
+ * Requires Sidekiq 6.0+ and Sidekiq Pro 5.0+
26
+
27
+ ## Upgrade
28
+
29
+ * Upgrade to the latest Sidekiq Enterprise 1.x.
30
+ ```ruby
31
+ gem 'sidekiq-ent', '< 2'
32
+ ```
33
+ * Fix any deprecation warnings you see.
34
+ * Upgrade to 2.x.
35
+ ```ruby
36
+ gem 'sidekiq-ent', '< 3'
37
+ ```
data/Ent-Changes.md CHANGED
@@ -2,7 +2,78 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
4
 
5
- Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
5
+ Please see [sidekiq.org](https://sidekiq.org) for more details and how to buy.
6
+
7
+ 2.2.1
8
+ -------------
9
+
10
+ - Support configurable timezones for periodic jobs [#4749]
11
+ - Handle edge case leading to negative expiry in uniqueness [#4763]
12
+
13
+ 2.2.0
14
+ -------------
15
+
16
+ - Add new **leaky bucket** rate limiter [#4414]
17
+ This allows clients to burst up to X calls before throttling
18
+ back to X calls per Y seconds. To limit the user to 60 calls
19
+ per minute:
20
+ ```ruby
21
+ leaker = Sidekiq::Limiter.leaky("shopify", 60, :minute)
22
+ leaker.within_limit do
23
+ ...
24
+ end
25
+ ```
26
+ See the Rate Limiting wiki page for more detail.
27
+ - Rate limiters may now customize their reschedule count [#4725]
28
+ To disable rate limit reschedules, use `reschedule: 0`.
29
+ ```ruby
30
+ Sidekiq::Limiter.concurrent("somename", 5, reschedule: 0)
31
+ ```
32
+ - Allow filtering by name in the Rate Limiter UI [#4695]
33
+ - Add IT locale
34
+
35
+ 2.1.2
36
+ -------------
37
+
38
+ - The Sidekiq Pro and Enterprise gem servers now `bundle install` much faster with **Bundler 2.2+** [#4158]
39
+ - Now that ActiveJobs support `sidekiq_options`, add support for uniqueness in AJs [#4667]
40
+
41
+ 2.1.1
42
+ -------------
43
+
44
+ - Add optional **app preload** in swarm, saves even more memory [#4646]
45
+ - Fix incorrect queue tags in historical metrics [#4377]
46
+
47
+ 2.1.0
48
+ -------------
49
+
50
+ - Move historical metrics to use tags rather than interpolating name [#4377]
51
+ ```
52
+ sidekiq.enqueued.#{name} -> sidekiq.queue.size with tag queue:#{name}
53
+ sidekiq.latency.#{name} -> sidekiq.queue.latency with tag queue:#{name}
54
+ ```
55
+ - Remove `concurrent-ruby` gem dependency [#4586]
56
+ - Add systemd `Type=notify` support for swarm [#4511]
57
+ - Length swarm's boot timeout to 60 sec [#4544]
58
+ - Add NL locale
59
+
60
+ 2.0.1
61
+ -------------
62
+
63
+ - Periodic job registration API adjusted to avoid loading classes in initializer [#4271]
64
+ - Remove support for deprecated ENV variables (COUNT, MAXMEM\_MB, INDEX) in swarm code
65
+
66
+ 2.0.0
67
+ -------------
68
+
69
+ - Except for the [newly required credentials](https://github.com/mperham/sidekiq/issues/4232), Sidekiq Enterprise 2.0 does
70
+ not have any significant migration steps.
71
+ - Sidekiq Enterprise must now be started with valid license credentials. [#4232]
72
+ - Call `GC.compact` if possible in sidekiqswarm before forking [#4181]
73
+ - Changes for forward-compatibility with Sidekiq 6.0.
74
+ - Add death handler to remove any lingering unique locks [#4162]
75
+ - Backoff can now be customized per rate limiter [#4219]
76
+ - Code formatting changes for StandardRB
6
77
 
7
78
  1.8.1
8
79
  -------------
data/Gemfile CHANGED
@@ -1,23 +1,24 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rake'
6
- gem 'redis-namespace'
7
- gem 'rails', '~> 5.2'
8
- gem 'sqlite3', '~> 1.3.6', platforms: :ruby
9
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
5
+ gem "rake"
6
+ gem "redis-namespace"
7
+ gem "rails", ">= 6.0.2"
8
+ gem "sqlite3", platforms: :ruby
9
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
10
10
 
11
11
  group :test do
12
- gem 'minitest'
13
- gem 'simplecov'
12
+ gem "minitest"
13
+ gem "simplecov"
14
+ gem "codecov", require: false
14
15
  end
15
16
 
16
17
  group :development, :test do
17
- gem 'pry-byebug', platforms: :mri
18
+ gem "standard"
18
19
  end
19
20
 
20
21
  group :load_test do
21
- gem 'hiredis'
22
- gem 'toxiproxy'
22
+ gem "hiredis"
23
+ gem "toxiproxy"
23
24
  end