sidekiq 6.0.5 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +13 -3
  3. data/Changes.md +39 -0
  4. data/Ent-Changes.md +14 -1
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +92 -92
  7. data/Pro-Changes.md +15 -1
  8. data/README.md +2 -5
  9. data/bin/sidekiq +26 -2
  10. data/lib/sidekiq.rb +9 -7
  11. data/lib/sidekiq/api.rb +2 -2
  12. data/lib/sidekiq/cli.rb +16 -6
  13. data/lib/sidekiq/client.rb +17 -10
  14. data/lib/sidekiq/extensions/active_record.rb +3 -2
  15. data/lib/sidekiq/extensions/class_methods.rb +5 -4
  16. data/lib/sidekiq/fetch.rb +20 -18
  17. data/lib/sidekiq/job_logger.rb +1 -1
  18. data/lib/sidekiq/launcher.rb +32 -5
  19. data/lib/sidekiq/logger.rb +7 -7
  20. data/lib/sidekiq/manager.rb +3 -3
  21. data/lib/sidekiq/monitor.rb +2 -2
  22. data/lib/sidekiq/processor.rb +4 -4
  23. data/lib/sidekiq/rails.rb +16 -18
  24. data/lib/sidekiq/redis_connection.rb +18 -13
  25. data/lib/sidekiq/sd_notify.rb +149 -0
  26. data/lib/sidekiq/systemd.rb +24 -0
  27. data/lib/sidekiq/testing.rb +1 -1
  28. data/lib/sidekiq/version.rb +1 -1
  29. data/lib/sidekiq/web.rb +16 -8
  30. data/lib/sidekiq/web/application.rb +3 -3
  31. data/lib/sidekiq/web/csrf_protection.rb +153 -0
  32. data/lib/sidekiq/web/helpers.rb +3 -6
  33. data/lib/sidekiq/web/router.rb +2 -4
  34. data/lib/sidekiq/worker.rb +4 -7
  35. data/sidekiq.gemspec +1 -2
  36. data/web/assets/javascripts/application.js +24 -21
  37. data/web/assets/stylesheets/application-dark.css +132 -124
  38. data/web/assets/stylesheets/application.css +5 -0
  39. data/web/locales/fr.yml +2 -2
  40. data/web/locales/lt.yml +83 -0
  41. data/web/locales/pl.yml +4 -4
  42. data/web/locales/vi.yml +83 -0
  43. data/web/views/layout.erb +1 -1
  44. metadata +10 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 624626b031eb97839cbef07f74a9e94dee930ef51fb1d471b566be9643b76449
4
- data.tar.gz: 8364d826b034685cbcdb3d46188d88b95add713ec1d3f99998b071aebfe63078
3
+ metadata.gz: e22aedd56d4f0b3a30fc73ceec6d246813b1b7e2f233dc2e19fe435c1689abd8
4
+ data.tar.gz: 8beb1e49cc43aa6f179f72cbd191832151facb48f01d67b4b6c979aa63cbbf1a
5
5
  SHA512:
6
- metadata.gz: 7375504648039835a884591e972e87c2e3ce2d0a522e6d40c5c2ead886558866f724a5695276214046c1f08a1ad1e19fc65d07670e098aeb126e76b37621b9a5
7
- data.tar.gz: c5af7245e5eee8ad3f0a714306e00e781b770f2ca31afeb6418e8fdd65ac9864bd7dc6fa76880449aa1e3f05623ee60a1d7de266ad06c303ca1e4d96b1f1a52b
6
+ metadata.gz: 8ad1d321a4e319cf7760f0984085c635cb98fd9aef600665bf90b7a301caa53e9d9fb42dc064196e083d115fd6719eaa1445263c32e4906c6c9de4789970c9e0
7
+ data.tar.gz: 4a4e5d184b7ba0cd8dcba3f27b8dc7ec65138ba1b34cd5414e2e6610f9a590c9bcae09940d96b960deb9db3d25b7b0314b1ff0c630b877e10ae2461b6fe645be
@@ -3,7 +3,7 @@ references:
3
3
  unit: &unit
4
4
  run:
5
5
  name: Run test suite
6
- command: bundle exec rake
6
+ command: bundle exec rake COVERAGE=1
7
7
  restore: &restore
8
8
  restore_cache:
9
9
  keys:
@@ -34,7 +34,17 @@ jobs:
34
34
  "ruby-2.6":
35
35
  docker:
36
36
  - image: circleci/ruby:2.6
37
- - image: circleci/redis:4.0
37
+ - image: circleci/redis:5.0
38
+ steps:
39
+ - checkout
40
+ - <<: *restore
41
+ - <<: *bundle
42
+ - <<: *save
43
+ - <<: *unit
44
+ "ruby-2.7":
45
+ docker:
46
+ - image: circleci/ruby:2.7
47
+ - image: circleci/redis:6.0
38
48
  steps:
39
49
  - checkout
40
50
  - <<: *restore
@@ -58,4 +68,4 @@ workflows:
58
68
  jobs:
59
69
  - "ruby-2.5"
60
70
  - "ruby-2.6"
61
- - "jruby"
71
+ - "ruby-2.7"
data/Changes.md CHANGED
@@ -2,12 +2,45 @@
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
+ HEAD
6
+ ---------
7
+
8
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
9
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
10
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
11
+ - Better error messages in Sidekiq::Client [#4549]
12
+ - Remove rack-protection, reimplement CSRF protection [#4588]
13
+ - Require redis-rb 4.2 [#4591]
14
+ - Update to jquery 1.12.4 [#4593]
15
+ - Refactor internal fetch logic and API [#4602]
16
+
17
+ 6.0.7
18
+ ---------
19
+
20
+ - Refactor systemd integration to work better with custom binaries [#4511]
21
+ - Don't connect to Redis at process exit if not needed [#4502]
22
+ - Remove Redis connection naming [#4479]
23
+ - Fix Redis Sentinel password redaction [#4499]
24
+ - Add Vietnamese locale (vi) [#4528]
25
+
26
+ 6.0.6
27
+ ---------
28
+
29
+ - **Integrate with systemd's watchdog and notification features** [#4488]
30
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
31
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
32
+ - Fix edge case where a job can be pushed without a queue.
33
+ - Flush job stats at exit [#4498]
34
+ - Check RAILS_ENV before RACK_ENV [#4493]
35
+ - Add Lithuanian locale [#4476]
36
+
5
37
  6.0.5
6
38
  ---------
7
39
 
8
40
  - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
9
41
  - Update APIs to use `UNLINK`, not `DEL`. [#4449]
10
42
  - Fix Ruby 2.7 warnings [#4412]
43
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
11
44
 
12
45
  6.0.4
13
46
  ---------
@@ -139,6 +172,12 @@ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for
139
172
  - Integrate the StandardRB code formatter to ensure consistent code
140
173
  styling. [#4114, gearnode]
141
174
 
175
+ 5.2.9
176
+ ---------
177
+
178
+ - Release Rack lock due to a cascade of CVEs. [#4566]
179
+ Pro-tip: don't lock Rack.
180
+
142
181
  5.2.8
143
182
  ---------
144
183
 
@@ -2,7 +2,20 @@
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.1.0
8
+ -------------
9
+
10
+ - Move historical metrics to use tags rather than interpolating name [#4377]
11
+ ```
12
+ sidekiq.enqueued.#{name} -> sidekiq.queue.size with tag queue:#{name}
13
+ sidekiq.latency.#{name} -> sidekiq.queue.latency with tag queue:#{name}
14
+ ```
15
+ - Remove `concurrent-ruby` gem dependency [#4586]
16
+ - Add systemd `Type=notify` support for swarm [#4511]
17
+ - Length swarm's boot timeout to 60 sec [#4544]
18
+ - Add NL locale
6
19
 
7
20
  2.0.1
8
21
  -------------
data/Gemfile CHANGED
@@ -11,10 +11,10 @@ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
11
11
  group :test do
12
12
  gem "minitest"
13
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
18
  gem "standard"
19
19
  end
20
20
 
@@ -1,81 +1,82 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq (6.0.5)
4
+ sidekiq (6.1.0)
5
5
  connection_pool (>= 2.2.2)
6
6
  rack (~> 2.0)
7
- rack-protection (>= 2.0.0)
8
- redis (>= 4.1.0)
7
+ redis (>= 4.2.0)
9
8
 
10
9
  GEM
11
10
  remote: https://rubygems.org/
12
11
  specs:
13
- actioncable (6.0.2.1)
14
- actionpack (= 6.0.2.1)
12
+ actioncable (6.0.3.1)
13
+ actionpack (= 6.0.3.1)
15
14
  nio4r (~> 2.0)
16
15
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.2.1)
18
- actionpack (= 6.0.2.1)
19
- activejob (= 6.0.2.1)
20
- activerecord (= 6.0.2.1)
21
- activestorage (= 6.0.2.1)
22
- activesupport (= 6.0.2.1)
16
+ actionmailbox (6.0.3.1)
17
+ actionpack (= 6.0.3.1)
18
+ activejob (= 6.0.3.1)
19
+ activerecord (= 6.0.3.1)
20
+ activestorage (= 6.0.3.1)
21
+ activesupport (= 6.0.3.1)
23
22
  mail (>= 2.7.1)
24
- actionmailer (6.0.2.1)
25
- actionpack (= 6.0.2.1)
26
- actionview (= 6.0.2.1)
27
- activejob (= 6.0.2.1)
23
+ actionmailer (6.0.3.1)
24
+ actionpack (= 6.0.3.1)
25
+ actionview (= 6.0.3.1)
26
+ activejob (= 6.0.3.1)
28
27
  mail (~> 2.5, >= 2.5.4)
29
28
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.2.1)
31
- actionview (= 6.0.2.1)
32
- activesupport (= 6.0.2.1)
29
+ actionpack (6.0.3.1)
30
+ actionview (= 6.0.3.1)
31
+ activesupport (= 6.0.3.1)
33
32
  rack (~> 2.0, >= 2.0.8)
34
33
  rack-test (>= 0.6.3)
35
34
  rails-dom-testing (~> 2.0)
36
35
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.2.1)
38
- actionpack (= 6.0.2.1)
39
- activerecord (= 6.0.2.1)
40
- activestorage (= 6.0.2.1)
41
- activesupport (= 6.0.2.1)
36
+ actiontext (6.0.3.1)
37
+ actionpack (= 6.0.3.1)
38
+ activerecord (= 6.0.3.1)
39
+ activestorage (= 6.0.3.1)
40
+ activesupport (= 6.0.3.1)
42
41
  nokogiri (>= 1.8.5)
43
- actionview (6.0.2.1)
44
- activesupport (= 6.0.2.1)
42
+ actionview (6.0.3.1)
43
+ activesupport (= 6.0.3.1)
45
44
  builder (~> 3.1)
46
45
  erubi (~> 1.4)
47
46
  rails-dom-testing (~> 2.0)
48
47
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.2.1)
50
- activesupport (= 6.0.2.1)
48
+ activejob (6.0.3.1)
49
+ activesupport (= 6.0.3.1)
51
50
  globalid (>= 0.3.6)
52
- activemodel (6.0.2.1)
53
- activesupport (= 6.0.2.1)
54
- activerecord (6.0.2.1)
55
- activemodel (= 6.0.2.1)
56
- activesupport (= 6.0.2.1)
51
+ activemodel (6.0.3.1)
52
+ activesupport (= 6.0.3.1)
53
+ activerecord (6.0.3.1)
54
+ activemodel (= 6.0.3.1)
55
+ activesupport (= 6.0.3.1)
57
56
  activerecord-jdbc-adapter (60.1-java)
58
57
  activerecord (~> 6.0.0)
59
58
  activerecord-jdbcsqlite3-adapter (60.1-java)
60
59
  activerecord-jdbc-adapter (= 60.1)
61
60
  jdbc-sqlite3 (~> 3.8, < 3.30)
62
- activestorage (6.0.2.1)
63
- actionpack (= 6.0.2.1)
64
- activejob (= 6.0.2.1)
65
- activerecord (= 6.0.2.1)
61
+ activestorage (6.0.3.1)
62
+ actionpack (= 6.0.3.1)
63
+ activejob (= 6.0.3.1)
64
+ activerecord (= 6.0.3.1)
66
65
  marcel (~> 0.3.1)
67
- activesupport (6.0.2.1)
66
+ activesupport (6.0.3.1)
68
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
69
68
  i18n (>= 0.7, < 2)
70
69
  minitest (~> 5.1)
71
70
  tzinfo (~> 1.1)
72
- zeitwerk (~> 2.2)
73
- ast (2.4.0)
71
+ zeitwerk (~> 2.2, >= 2.2.2)
72
+ ast (2.4.1)
74
73
  builder (3.2.4)
75
- byebug (11.1.1)
76
- coderay (1.1.2)
74
+ codecov (0.1.17)
75
+ json
76
+ simplecov
77
+ url
77
78
  concurrent-ruby (1.1.6)
78
- connection_pool (2.2.2)
79
+ connection_pool (2.2.3)
79
80
  crass (1.0.6)
80
81
  docile (1.3.2)
81
82
  erubi (1.9.0)
@@ -85,10 +86,10 @@ GEM
85
86
  hiredis (0.6.3-java)
86
87
  i18n (1.8.2)
87
88
  concurrent-ruby (~> 1.0)
88
- jaro_winkler (1.5.4)
89
- jaro_winkler (1.5.4-java)
90
89
  jdbc-sqlite3 (3.28.0)
91
- loofah (2.4.0)
90
+ json (2.3.0)
91
+ json (2.3.0-java)
92
+ loofah (2.5.0)
92
93
  crass (~> 1.0.2)
93
94
  nokogiri (>= 1.5.9)
94
95
  mail (2.7.1)
@@ -96,74 +97,72 @@ GEM
96
97
  marcel (0.3.3)
97
98
  mimemagic (~> 0.3.2)
98
99
  method_source (0.9.2)
99
- mimemagic (0.3.4)
100
+ mimemagic (0.3.5)
100
101
  mini_mime (1.0.2)
101
102
  mini_portile2 (2.4.0)
102
- minitest (5.14.0)
103
+ minitest (5.14.1)
103
104
  nio4r (2.5.2)
104
105
  nio4r (2.5.2-java)
105
- nokogiri (1.10.8)
106
+ nokogiri (1.10.9)
106
107
  mini_portile2 (~> 2.4.0)
107
- nokogiri (1.10.8-java)
108
- parallel (1.19.1)
109
- parser (2.7.0.2)
108
+ nokogiri (1.10.9-java)
109
+ parallel (1.19.2)
110
+ parser (2.7.1.3)
110
111
  ast (~> 2.4.0)
111
- pry (0.12.2)
112
- coderay (~> 1.1.0)
113
- method_source (~> 0.9.0)
114
- pry-byebug (3.8.0)
115
- byebug (~> 11.0)
116
- pry (~> 0.10)
117
112
  rack (2.2.2)
118
- rack-protection (2.0.8.1)
119
- rack
120
113
  rack-test (1.1.0)
121
114
  rack (>= 1.0, < 3)
122
- rails (6.0.2.1)
123
- actioncable (= 6.0.2.1)
124
- actionmailbox (= 6.0.2.1)
125
- actionmailer (= 6.0.2.1)
126
- actionpack (= 6.0.2.1)
127
- actiontext (= 6.0.2.1)
128
- actionview (= 6.0.2.1)
129
- activejob (= 6.0.2.1)
130
- activemodel (= 6.0.2.1)
131
- activerecord (= 6.0.2.1)
132
- activestorage (= 6.0.2.1)
133
- activesupport (= 6.0.2.1)
115
+ rails (6.0.3.1)
116
+ actioncable (= 6.0.3.1)
117
+ actionmailbox (= 6.0.3.1)
118
+ actionmailer (= 6.0.3.1)
119
+ actionpack (= 6.0.3.1)
120
+ actiontext (= 6.0.3.1)
121
+ actionview (= 6.0.3.1)
122
+ activejob (= 6.0.3.1)
123
+ activemodel (= 6.0.3.1)
124
+ activerecord (= 6.0.3.1)
125
+ activestorage (= 6.0.3.1)
126
+ activesupport (= 6.0.3.1)
134
127
  bundler (>= 1.3.0)
135
- railties (= 6.0.2.1)
128
+ railties (= 6.0.3.1)
136
129
  sprockets-rails (>= 2.0.0)
137
130
  rails-dom-testing (2.0.3)
138
131
  activesupport (>= 4.2.0)
139
132
  nokogiri (>= 1.6)
140
133
  rails-html-sanitizer (1.3.0)
141
134
  loofah (~> 2.3)
142
- railties (6.0.2.1)
143
- actionpack (= 6.0.2.1)
144
- activesupport (= 6.0.2.1)
135
+ railties (6.0.3.1)
136
+ actionpack (= 6.0.3.1)
137
+ activesupport (= 6.0.3.1)
145
138
  method_source
146
139
  rake (>= 0.8.7)
147
140
  thor (>= 0.20.3, < 2.0)
148
141
  rainbow (3.0.0)
149
142
  rake (13.0.1)
150
- redis (4.1.3)
143
+ redis (4.2.0)
151
144
  redis-namespace (1.7.0)
152
145
  redis (>= 3.0.4)
153
- rubocop (0.77.0)
154
- jaro_winkler (~> 1.5.1)
146
+ regexp_parser (1.7.1)
147
+ rexml (3.2.4)
148
+ rubocop (0.85.1)
155
149
  parallel (~> 1.10)
156
- parser (>= 2.6)
150
+ parser (>= 2.7.0.1)
157
151
  rainbow (>= 2.2.2, < 4.0)
152
+ regexp_parser (>= 1.7)
153
+ rexml
154
+ rubocop-ast (>= 0.0.3)
158
155
  ruby-progressbar (~> 1.7)
159
- unicode-display_width (>= 1.4.0, < 1.7)
160
- rubocop-performance (1.5.2)
156
+ unicode-display_width (>= 1.4.0, < 2.0)
157
+ rubocop-ast (0.0.3)
158
+ parser (>= 2.7.0.1)
159
+ rubocop-performance (1.6.1)
161
160
  rubocop (>= 0.71.0)
162
161
  ruby-progressbar (1.10.1)
163
- simplecov (0.18.2)
162
+ simplecov (0.18.5)
164
163
  docile (~> 1.1)
165
164
  simplecov-html (~> 0.11)
166
- simplecov-html (0.12.0)
165
+ simplecov-html (0.12.2)
167
166
  sprockets (4.0.0)
168
167
  concurrent-ruby (~> 1.0)
169
168
  rack (> 1, < 3)
@@ -172,22 +171,23 @@ GEM
172
171
  activesupport (>= 4.0)
173
172
  sprockets (>= 3.0.0)
174
173
  sqlite3 (1.4.2)
175
- standard (0.1.7)
176
- rubocop (~> 0.77.0)
177
- rubocop-performance (~> 1.5.1)
174
+ standard (0.4.7)
175
+ rubocop (~> 0.85.0)
176
+ rubocop-performance (~> 1.6.0)
178
177
  thor (1.0.1)
179
178
  thread_safe (0.3.6)
180
179
  thread_safe (0.3.6-java)
181
180
  toxiproxy (1.0.3)
182
- tzinfo (1.2.6)
181
+ tzinfo (1.2.7)
183
182
  thread_safe (~> 0.1)
184
- unicode-display_width (1.6.1)
185
- websocket-driver (0.7.1)
183
+ unicode-display_width (1.7.0)
184
+ url (0.3.2)
185
+ websocket-driver (0.7.2)
186
186
  websocket-extensions (>= 0.1.0)
187
- websocket-driver (0.7.1-java)
187
+ websocket-driver (0.7.2-java)
188
188
  websocket-extensions (>= 0.1.0)
189
189
  websocket-extensions (0.1.4)
190
- zeitwerk (2.2.2)
190
+ zeitwerk (2.3.0)
191
191
 
192
192
  PLATFORMS
193
193
  java
@@ -195,9 +195,9 @@ PLATFORMS
195
195
 
196
196
  DEPENDENCIES
197
197
  activerecord-jdbcsqlite3-adapter
198
+ codecov
198
199
  hiredis
199
200
  minitest
200
- pry-byebug
201
201
  rails (>= 6.0.2)
202
202
  rake
203
203
  redis-namespace
@@ -2,7 +2,21 @@
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
+ 5.1.0
8
+ ---------
9
+
10
+ - Remove old Statsd metrics with `WorkerName` in the name [#4377]
11
+ ```
12
+ job.WorkerName.count -> job.count with tag worker:WorkerName
13
+ job.WorkerName.perform -> job.perform with tag worker:WorkerName
14
+ job.WorkerName.failure -> job.failure with tag worker:WorkerName
15
+ ```
16
+ - Remove `concurrent-ruby` gem dependency [#4586]
17
+ - Update `constantize` for batch callbacks. [#4469]
18
+ - Add queue tag to `jobs.recovered.fetch` metric [#4594]
19
+ - Refactor Pro's fetch infrastructure [#4602]
6
20
 
7
21
  5.0.1
8
22
  ---------