deimos-ruby 1.8.1.pre.beta6 → 1.8.1.pre.beta7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d38b0803c074ff89dd8ff166ed8de2dcacb2ecaae46cb321abc0de630498e849
4
- data.tar.gz: efecfba1d4d76a83270534ab7687c344253b2e4a7765dde9d42b6959083171db
3
+ metadata.gz: 6ed6bdbc70b4e29dfd893853d2df53ae6779fe3a95adc85a099b270674908135
4
+ data.tar.gz: ca1da1180acac7a76cb3abd4ce9c4ab16712b16e94f88b79ae5c952d98a74500
5
5
  SHA512:
6
- metadata.gz: d435a7c9f130650f7f9849554f2d0a71b87a9f8bddca2f542b94848ca13e8fe3084aa095f19eadd581a7af42f43511509ae9dc06bbb69982da34463304945a69
7
- data.tar.gz: 9cfd22453a8a59d6c74a46bf41c6feb874bf125fb335c4b084df04f681bb9f3d2b03a8295a18c86166c194e592855d8b811bad39c29565002ec6dd6100edd589
6
+ metadata.gz: fd3b5728ce13e60b35ffc0b7dd025e402fa4bbd760edc000ca8cd587bca0c7f39d136eba951ebd631a711cf79171716021f04bda38c8262318ab344d8452be34
7
+ data.tar.gz: '0305200088b9d463c92562be1d9bf27d2727a06c10a147fdb6bace097adc795b2cfca6d5942eb4f06ee0da316e5a41db26b1fd04698d63987e2b45fdf7aea4c7'
@@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ ## 1.8.1-beta7 - 2020-08-25
11
+
12
+ ### Fixes :wrench:
13
+ - Fix for crash when sending pending metrics with DB producer.
14
+ - Fix for compacting messages if all the keys are already unique
15
+ (fixes [#75](https://github.com/flipp-oss/deimos/issues/75))
16
+
10
17
  ## 1.8.1-beta6 - 2020-08-13
18
+
19
+ ### Fixes :wrench:
20
+
11
21
  - Fix for consuming nil payloads with Ruby 2.3.
12
22
 
13
23
  ## 1.8.1-beta5 - 2020-08-13
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deimos-ruby (1.8.1.pre.beta6)
4
+ deimos-ruby (1.8.1.pre.beta7)
5
5
  avro_turf (~> 0.11)
6
6
  phobos (~> 1.9)
7
7
  ruby-kafka (~> 0.7)
@@ -161,7 +161,7 @@ module Deimos
161
161
  # the oldest message, or the last time we processed, whichever comes
162
162
  # last.
163
163
  if message_record
164
- record_earliest = record.earliest
164
+ record_earliest = message_record.earliest
165
165
  # SQLite gives a string here
166
166
  if record_earliest.is_a?(String)
167
167
  record_earliest = Time.zone.parse(record_earliest)
@@ -231,7 +231,7 @@ module Deimos
231
231
  return batch if config.compact_topics != :all &&
232
232
  !config.compact_topics.include?(topic)
233
233
 
234
- batch.reverse.uniq!(&:key).reverse!
234
+ batch.reverse.uniq(&:key).reverse!
235
235
  end
236
236
  end
237
237
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.8.1-beta6'
4
+ VERSION = '1.8.1-beta7'
5
5
  end
@@ -34,8 +34,8 @@ module ConsumerTest
34
34
 
35
35
  it 'should consume a nil message' do
36
36
  test_consume_message(MyConsumer, nil) do |payload, _metadata|
37
- expect(payload).to be_nil
38
- end
37
+ expect(payload).to be_nil
38
+ end
39
39
  end
40
40
 
41
41
  it 'should consume a message idempotently' do
@@ -155,6 +155,10 @@ each_db_config(Deimos::Utils::DbProducer) do
155
155
  Deimos.configure { |c| c.db_producer.compact_topics = [] }
156
156
  end
157
157
 
158
+ it 'should compact messages when all messages are unique' do
159
+ Deimos.configure { |c| c.db_producer.compact_topics = %w(my-topic my-topic2) }
160
+ expect(producer.compact_messages(deduped_batch)).to eq(deduped_batch)
161
+ end
158
162
  end
159
163
  end
160
164
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1.pre.beta6
4
+ version: 1.8.1.pre.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf