deimos-ruby 1.8.7 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c12e06b13f4b1910a93d955ddca456bdfaa0d8c5ee1a925cc1aea5c2d0f4df3
4
- data.tar.gz: b4ef92834678153a746b585a0c6c5ff36cb32fc65cd3fc94accc8a35e7fd6feb
3
+ metadata.gz: 810ce13be8ab8ba5dc64d586ed863a8603fdcc96961ed1779d1af791589161e8
4
+ data.tar.gz: c6be10e665fee7e50583c927253877d5e70d1ad3905560601e2cde844debf1cb
5
5
  SHA512:
6
- metadata.gz: 4c3eaf327c4483302847733e1a5134b2f559f4e0ed2e7b090d893292d0cde80ad7f9677c54b0f3b415d3933e377013c286fc133399705803419f0df6cb446f75
7
- data.tar.gz: a3bb3aa32da8ed98ee4bb763cd5c123f1289042219e85b219629c9e6b4a3ddd75870e0c7d9ea74b0e7d24a6edc707c5d0af39b3e6847de3da3d271679113040f
6
+ metadata.gz: 42517bc99f57cef76b0f03957f59550aae1d3234b3f2680958b1d8fd6cb8bd431a43459a5b8542c30658146adfd12fe5eecbc608dd9b878e18166edb84f9ee80
7
+ data.tar.gz: d5c68af5593e66ac67125108a2f583af7f8003a40515816b6797a17c200a5cffd8aef77d56b400f5c44780c42b78ed0a430037dd2b7033776374aa6a1a5cfb97
data/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ ## 1.10.1 - 2021-06-21
11
+
12
+ - ### Fixes :wrench:
13
+
14
+ - Fixed crash when trying to decode a nil payload (e.g. during instrumentation of `send_produce_error`.)
15
+
16
+ ## 1.10.0 - 2021-03-22
17
+
18
+ - ### Roadmap :car:
19
+
20
+ - Extracted the configuration piece into a separate gem, [fig_tree](https://www.github.com/flipp-oss/fig_tree).
21
+ - Added a `save_record` method to ActiveRecordConsumer in case calling code wants to work with the record before saving.
22
+
23
+ - ### Fixes :wrench:
24
+
25
+ - Fixed a regression where the default values for consumer / Phobos listener configs were not correct (they were all nil). This is technically a breaking change, but it puts the configs back the way they were at version 1.4 and matches the documentation.
26
+
27
+ ## 1.9.2 - 2021-01-29
28
+
29
+ - ### Fixes :wrench:
30
+
31
+ - Fix for `uninitialized constant ActiveSupport::Autoload` in certain circumstances
32
+ - Removed unnecessary monkey patch which was crashing on newer versions of ruby-kafka
33
+
34
+ ## 1.9.0 - 2021-01-28
35
+
36
+ - ### Roadmap :car:
37
+
38
+ - Bumped the version of ruby-kafka to latest
39
+
40
+ - ### Fixes :wrench:
41
+
42
+ - Prevents DB Poller from reconnecting to DB if there is an open transaction
43
+ - Replaces `before` by `prepend_before` for more consistent test setups.
44
+ - Adds validation in the `kafka_producers` method (fixes [#90](https://github.com/flipp-oss/deimos/issues/90))
45
+
10
46
  ## 1.8.7 - 2021-01-14
11
47
 
12
48
  - ### Roadmap :car:
data/Gemfile.lock CHANGED
@@ -1,77 +1,78 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deimos-ruby (1.8.7)
4
+ deimos-ruby (1.10.1)
5
5
  avro_turf (~> 0.11)
6
+ fig_tree (~> 0.0.2)
6
7
  phobos (>= 1.9, < 3.0)
7
- ruby-kafka (~> 0.7)
8
- sigurd (= 0.0.1)
8
+ ruby-kafka (< 2)
9
+ sigurd (~> 0.0.1)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
12
13
  specs:
13
- actioncable (6.1.1)
14
- actionpack (= 6.1.1)
15
- activesupport (= 6.1.1)
14
+ actioncable (6.1.3)
15
+ actionpack (= 6.1.3)
16
+ activesupport (= 6.1.3)
16
17
  nio4r (~> 2.0)
17
18
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.1.1)
19
- actionpack (= 6.1.1)
20
- activejob (= 6.1.1)
21
- activerecord (= 6.1.1)
22
- activestorage (= 6.1.1)
23
- activesupport (= 6.1.1)
19
+ actionmailbox (6.1.3)
20
+ actionpack (= 6.1.3)
21
+ activejob (= 6.1.3)
22
+ activerecord (= 6.1.3)
23
+ activestorage (= 6.1.3)
24
+ activesupport (= 6.1.3)
24
25
  mail (>= 2.7.1)
25
- actionmailer (6.1.1)
26
- actionpack (= 6.1.1)
27
- actionview (= 6.1.1)
28
- activejob (= 6.1.1)
29
- activesupport (= 6.1.1)
26
+ actionmailer (6.1.3)
27
+ actionpack (= 6.1.3)
28
+ actionview (= 6.1.3)
29
+ activejob (= 6.1.3)
30
+ activesupport (= 6.1.3)
30
31
  mail (~> 2.5, >= 2.5.4)
31
32
  rails-dom-testing (~> 2.0)
32
- actionpack (6.1.1)
33
- actionview (= 6.1.1)
34
- activesupport (= 6.1.1)
33
+ actionpack (6.1.3)
34
+ actionview (= 6.1.3)
35
+ activesupport (= 6.1.3)
35
36
  rack (~> 2.0, >= 2.0.9)
36
37
  rack-test (>= 0.6.3)
37
38
  rails-dom-testing (~> 2.0)
38
39
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
- actiontext (6.1.1)
40
- actionpack (= 6.1.1)
41
- activerecord (= 6.1.1)
42
- activestorage (= 6.1.1)
43
- activesupport (= 6.1.1)
40
+ actiontext (6.1.3)
41
+ actionpack (= 6.1.3)
42
+ activerecord (= 6.1.3)
43
+ activestorage (= 6.1.3)
44
+ activesupport (= 6.1.3)
44
45
  nokogiri (>= 1.8.5)
45
- actionview (6.1.1)
46
- activesupport (= 6.1.1)
46
+ actionview (6.1.3)
47
+ activesupport (= 6.1.3)
47
48
  builder (~> 3.1)
48
49
  erubi (~> 1.4)
49
50
  rails-dom-testing (~> 2.0)
50
51
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (6.1.1)
52
- activesupport (= 6.1.1)
52
+ activejob (6.1.3)
53
+ activesupport (= 6.1.3)
53
54
  globalid (>= 0.3.6)
54
- activemodel (6.1.1)
55
- activesupport (= 6.1.1)
56
- activerecord (6.1.1)
57
- activemodel (= 6.1.1)
58
- activesupport (= 6.1.1)
59
- activerecord-import (1.0.7)
55
+ activemodel (6.1.3)
56
+ activesupport (= 6.1.3)
57
+ activerecord (6.1.3)
58
+ activemodel (= 6.1.3)
59
+ activesupport (= 6.1.3)
60
+ activerecord-import (1.0.8)
60
61
  activerecord (>= 3.2)
61
- activestorage (6.1.1)
62
- actionpack (= 6.1.1)
63
- activejob (= 6.1.1)
64
- activerecord (= 6.1.1)
65
- activesupport (= 6.1.1)
62
+ activestorage (6.1.3)
63
+ actionpack (= 6.1.3)
64
+ activejob (= 6.1.3)
65
+ activerecord (= 6.1.3)
66
+ activesupport (= 6.1.3)
66
67
  marcel (~> 0.3.1)
67
68
  mimemagic (~> 0.3.2)
68
- activesupport (6.1.1)
69
+ activesupport (6.1.3)
69
70
  concurrent-ruby (~> 1.0, >= 1.0.2)
70
71
  i18n (>= 1.6, < 2)
71
72
  minitest (>= 5.1)
72
73
  tzinfo (~> 2.0)
73
74
  zeitwerk (~> 2.3)
74
- ast (2.4.1)
75
+ ast (2.4.2)
75
76
  avro (1.9.2)
76
77
  multi_json
77
78
  avro_turf (0.11.0)
@@ -79,21 +80,23 @@ GEM
79
80
  excon (~> 0.45)
80
81
  builder (3.2.4)
81
82
  coderay (1.1.3)
82
- concurrent-ruby (1.1.7)
83
- concurrent-ruby-ext (1.1.7)
84
- concurrent-ruby (= 1.1.7)
83
+ concurrent-ruby (1.1.8)
84
+ concurrent-ruby-ext (1.1.8)
85
+ concurrent-ruby (= 1.1.8)
85
86
  crass (1.0.6)
86
- database_cleaner (1.8.5)
87
- ddtrace (0.37.0)
87
+ database_cleaner (1.99.0)
88
+ ddtrace (0.46.0)
88
89
  msgpack
89
90
  diff-lcs (1.4.4)
90
91
  digest-crc (0.6.3)
91
92
  rake (>= 12.0.0, < 14.0.0)
92
- dogstatsd-ruby (4.8.1)
93
+ dogstatsd-ruby (4.8.3)
93
94
  erubi (1.10.0)
94
- excon (0.78.1)
95
+ excon (0.81.0)
95
96
  exponential-backoff (0.0.4)
96
- ffi (1.13.1)
97
+ ffi (1.15.0)
98
+ fig_tree (0.0.2)
99
+ activesupport (>= 3.0.0)
97
100
  formatador (0.2.5)
98
101
  globalid (0.4.2)
99
102
  activesupport (>= 4.2.0)
@@ -111,47 +114,49 @@ GEM
111
114
  guard (~> 2.1)
112
115
  guard-compat (~> 1.1)
113
116
  rspec (>= 2.99.0, < 4.0)
114
- guard-rubocop (1.3.0)
117
+ guard-rubocop (1.4.0)
115
118
  guard (~> 2.0)
116
- rubocop (~> 0.20)
117
- i18n (1.8.7)
119
+ rubocop (< 2.0)
120
+ i18n (1.8.9)
118
121
  concurrent-ruby (~> 1.0)
119
- listen (3.2.1)
122
+ listen (3.4.1)
120
123
  rb-fsevent (~> 0.10, >= 0.10.3)
121
124
  rb-inotify (~> 0.9, >= 0.9.10)
122
125
  little-plugger (1.1.4)
123
126
  logging (2.3.0)
124
127
  little-plugger (~> 1.1)
125
128
  multi_json (~> 1.14)
126
- loofah (2.8.0)
129
+ loofah (2.9.0)
127
130
  crass (~> 1.0.2)
128
131
  nokogiri (>= 1.5.9)
129
- lumberjack (1.2.6)
132
+ lumberjack (1.2.8)
130
133
  mail (2.7.1)
131
134
  mini_mime (>= 0.1.1)
132
135
  marcel (0.3.3)
133
136
  mimemagic (~> 0.3.2)
134
137
  method_source (1.0.0)
135
- mimemagic (0.3.5)
138
+ mimemagic (0.3.10)
139
+ nokogiri (~> 1)
140
+ rake
136
141
  mini_mime (1.0.2)
137
- mini_portile2 (2.5.0)
138
- minitest (5.14.3)
139
- msgpack (1.3.3)
142
+ mini_portile2 (2.5.1)
143
+ minitest (5.14.4)
144
+ msgpack (1.4.2)
140
145
  multi_json (1.15.0)
141
146
  mysql2 (0.5.3)
142
147
  nenv (0.3.0)
143
- nio4r (2.5.4)
144
- nokogiri (1.11.1)
148
+ nio4r (2.5.7)
149
+ nokogiri (1.11.5)
145
150
  mini_portile2 (~> 2.5.0)
146
151
  racc (~> 1.4)
147
152
  notiffany (0.1.3)
148
153
  nenv (~> 0.1)
149
154
  shellany (~> 0.0)
150
- parallel (1.19.2)
151
- parser (2.7.1.4)
155
+ parallel (1.20.1)
156
+ parser (3.0.0.0)
152
157
  ast (~> 2.4.1)
153
158
  pg (1.2.3)
154
- phobos (2.0.1)
159
+ phobos (2.0.2)
155
160
  activesupport (>= 3.0.0)
156
161
  concurrent-ruby (>= 1.0.2)
157
162
  concurrent-ruby-ext (>= 1.0.2)
@@ -159,36 +164,36 @@ GEM
159
164
  logging
160
165
  ruby-kafka
161
166
  thor
162
- pry (0.13.1)
167
+ pry (0.14.0)
163
168
  coderay (~> 1.1)
164
169
  method_source (~> 1.0)
165
170
  racc (1.5.2)
166
171
  rack (2.2.3)
167
172
  rack-test (1.1.0)
168
173
  rack (>= 1.0, < 3)
169
- rails (6.1.1)
170
- actioncable (= 6.1.1)
171
- actionmailbox (= 6.1.1)
172
- actionmailer (= 6.1.1)
173
- actionpack (= 6.1.1)
174
- actiontext (= 6.1.1)
175
- actionview (= 6.1.1)
176
- activejob (= 6.1.1)
177
- activemodel (= 6.1.1)
178
- activerecord (= 6.1.1)
179
- activestorage (= 6.1.1)
180
- activesupport (= 6.1.1)
174
+ rails (6.1.3)
175
+ actioncable (= 6.1.3)
176
+ actionmailbox (= 6.1.3)
177
+ actionmailer (= 6.1.3)
178
+ actionpack (= 6.1.3)
179
+ actiontext (= 6.1.3)
180
+ actionview (= 6.1.3)
181
+ activejob (= 6.1.3)
182
+ activemodel (= 6.1.3)
183
+ activerecord (= 6.1.3)
184
+ activestorage (= 6.1.3)
185
+ activesupport (= 6.1.3)
181
186
  bundler (>= 1.15.0)
182
- railties (= 6.1.1)
187
+ railties (= 6.1.3)
183
188
  sprockets-rails (>= 2.0.0)
184
189
  rails-dom-testing (2.0.3)
185
190
  activesupport (>= 4.2.0)
186
191
  nokogiri (>= 1.6)
187
192
  rails-html-sanitizer (1.3.0)
188
193
  loofah (~> 2.3)
189
- railties (6.1.1)
190
- actionpack (= 6.1.1)
191
- activesupport (= 6.1.1)
194
+ railties (6.1.3)
195
+ actionpack (= 6.1.3)
196
+ activesupport (= 6.1.3)
192
197
  method_source
193
198
  rake (>= 0.8.7)
194
199
  thor (~> 1.0)
@@ -197,29 +202,29 @@ GEM
197
202
  rb-fsevent (0.10.4)
198
203
  rb-inotify (0.10.1)
199
204
  ffi (~> 1.0)
200
- regexp_parser (1.7.1)
201
- rexml (3.2.4)
202
- rspec (3.9.0)
203
- rspec-core (~> 3.9.0)
204
- rspec-expectations (~> 3.9.0)
205
- rspec-mocks (~> 3.9.0)
206
- rspec-core (3.9.2)
207
- rspec-support (~> 3.9.3)
208
- rspec-expectations (3.9.2)
205
+ regexp_parser (2.1.1)
206
+ rexml (3.2.5)
207
+ rspec (3.10.0)
208
+ rspec-core (~> 3.10.0)
209
+ rspec-expectations (~> 3.10.0)
210
+ rspec-mocks (~> 3.10.0)
211
+ rspec-core (3.10.1)
212
+ rspec-support (~> 3.10.0)
213
+ rspec-expectations (3.10.1)
209
214
  diff-lcs (>= 1.2.0, < 2.0)
210
- rspec-support (~> 3.9.0)
211
- rspec-mocks (3.9.1)
215
+ rspec-support (~> 3.10.0)
216
+ rspec-mocks (3.10.2)
212
217
  diff-lcs (>= 1.2.0, < 2.0)
213
- rspec-support (~> 3.9.0)
214
- rspec-rails (4.0.1)
218
+ rspec-support (~> 3.10.0)
219
+ rspec-rails (4.1.1)
215
220
  actionpack (>= 4.2)
216
221
  activesupport (>= 4.2)
217
222
  railties (>= 4.2)
218
- rspec-core (~> 3.9)
219
- rspec-expectations (~> 3.9)
220
- rspec-mocks (~> 3.9)
221
- rspec-support (~> 3.9)
222
- rspec-support (3.9.3)
223
+ rspec-core (~> 3.10)
224
+ rspec-expectations (~> 3.10)
225
+ rspec-mocks (~> 3.10)
226
+ rspec-support (~> 3.10)
227
+ rspec-support (3.10.2)
223
228
  rspec_junit_formatter (0.4.1)
224
229
  rspec-core (>= 2, < 4, != 2.12.0)
225
230
  rubocop (0.88.0)
@@ -231,15 +236,15 @@ GEM
231
236
  rubocop-ast (>= 0.1.0, < 1.0)
232
237
  ruby-progressbar (~> 1.7)
233
238
  unicode-display_width (>= 1.4.0, < 2.0)
234
- rubocop-ast (0.2.0)
235
- parser (>= 2.7.0.1)
239
+ rubocop-ast (0.8.0)
240
+ parser (>= 2.7.1.5)
236
241
  rubocop-rspec (1.42.0)
237
242
  rubocop (>= 0.87.0)
238
- ruby-kafka (0.7.10)
243
+ ruby-kafka (1.3.0)
239
244
  digest-crc
240
- ruby-progressbar (1.10.1)
245
+ ruby-progressbar (1.11.0)
241
246
  shellany (0.0.1)
242
- sigurd (0.0.1)
247
+ sigurd (0.0.3)
243
248
  concurrent-ruby (~> 1)
244
249
  exponential-backoff
245
250
  sprockets (4.0.2)
@@ -250,7 +255,7 @@ GEM
250
255
  activesupport (>= 4.0)
251
256
  sprockets (>= 3.0.0)
252
257
  sqlite3 (1.4.2)
253
- thor (1.0.1)
258
+ thor (1.1.0)
254
259
  tzinfo (2.0.4)
255
260
  concurrent-ruby (~> 1.0)
256
261
  unicode-display_width (1.7.0)
@@ -284,4 +289,4 @@ DEPENDENCIES
284
289
  sqlite3 (~> 1.3)
285
290
 
286
291
  BUNDLED WITH
287
- 2.2.5
292
+ 2.2.17
data/deimos-ruby.gemspec CHANGED
@@ -20,8 +20,9 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency('avro_turf', '~> 0.11')
22
22
  spec.add_runtime_dependency('phobos', '>= 1.9', '< 3.0')
23
- spec.add_runtime_dependency('ruby-kafka', '~> 0.7')
24
- spec.add_runtime_dependency('sigurd', '0.0.1')
23
+ spec.add_runtime_dependency('ruby-kafka', '< 2')
24
+ spec.add_runtime_dependency('sigurd', '~> 0.0.1')
25
+ spec.add_runtime_dependency('fig_tree', '~> 0.0.2')
25
26
 
26
27
  spec.add_development_dependency('activerecord-import')
27
28
  spec.add_development_dependency('avro', '~> 1.9')
data/docs/ARCHITECTURE.md CHANGED
@@ -74,11 +74,7 @@ must define methods such as:
74
74
 
75
75
  ### Configuration
76
76
 
77
- Deimos has its own `Configurable` module that makes heavy use of `method_missing`
78
- to provide a very succinct but powerful configuration format (including
79
- default values, procs, print out as hash, reset, etc.). It also
80
- allows for multiple blocks to define different objects of the same time
81
- (like producers, consumers, pollers etc.).
77
+ Deimos uses the [https://www.github.com/flipp_oss/fig_tree](fig_tree) gem for configuration.
82
78
 
83
79
  The configuration definition for Deimos is in `config/configuration.rb`. In
84
80
  addition, there are methods in `config/phobos_config.rb` which translate to/from
@@ -91,6 +91,7 @@ delivery|`:batch`|The delivery mode for the consumer. Possible values: `:message
91
91
  session_timeout|300|Number of seconds after which, if a client hasn't contacted the Kafka cluster, it will be kicked out of the group.
92
92
  offset_commit_interval|10|Interval between offset commits, in seconds.
93
93
  offset_commit_threshold|0|Number of messages that can be processed before their offsets are committed. If zero, offset commits are not triggered by message processing
94
+ offset_retention_time|nil|The time period that committed offsets will be retained, in seconds. Defaults to the broker setting.
94
95
  heartbeat_interval|10|Interval between heartbeats; must be less than the session window.
95
96
  backoff|`(1000..60_000)`|Range representing the minimum and maximum number of milliseconds to back off after a consumer error.
96
97
 
data/lib/deimos.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support'
4
+
3
5
  require 'phobos'
4
6
  require 'deimos/version'
5
7
  require 'deimos/config/configuration'
@@ -18,7 +20,6 @@ require 'deimos/backends/test'
18
20
 
19
21
  require 'deimos/schema_backends/base'
20
22
 
21
- require 'deimos/monkey_patches/ruby_kafka_heartbeat'
22
23
  require 'deimos/monkey_patches/phobos_producer'
23
24
  require 'deimos/monkey_patches/phobos_cli'
24
25