logstash-integration-kafka 11.3.2-java → 11.3.3-java

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: cd3536a455fdf7a64f5882e81c0648022d572660d4dc45841249374c1cd7e406
4
- data.tar.gz: 26281f8584e29961625c8e385cfd599fd43444cbedd84d191b5542f603d00701
3
+ metadata.gz: b779dc371104b0d12e9c0653c3503c316da6c283f240a48d9e93af8aab1a6657
4
+ data.tar.gz: 5cc97ac62bf631856947cab6f408bff40f39d77b038fd169445cca102a54beb2
5
5
  SHA512:
6
- metadata.gz: 226f3c894edb182246d36bc283f7fc8d5d8471d9d411b98054a3770f7e414ca321ddbe401012c53ff5bbf4fd74da0340193153ebf7204a74e03802dc8c3df8ad
7
- data.tar.gz: 12a5454b826df30697e4f505e96893687202b8cd17536599a5832a518653274218a278d0139c3150f7c48806e823251f91f3b583ee9b60f828104b5e052fea1b
6
+ metadata.gz: e6f4198f56a1f964db493573fa8b66a89f6c869885b43b964e43c947f1e81906eac078be550d8d1e32a59f1f5d7b89428adba125dfc4324fbb7fc0075382b3dd
7
+ data.tar.gz: f27c13d89ebe188e952177dbab113cdc9748b40c854d044a51be94ca69ec636627256e79e403bfac4e32300affbd1176381accc40cb7ee3c5740b51127bfffca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
+ ## 11.3.3
2
+ - Fix "Can't modify frozen string" error when record value is `nil` (tombstones) [#155](https://github.com/logstash-plugins/logstash-integration-kafka/pull/155)
3
+
1
4
  ## 11.3.2
2
- - Fix: update Avro library [#150](https://api.github.com/repos/logstash-plugins/logstash-integration-kafka/pulls/150)
5
+ - Fix: update Avro library [#150](https://github.com/logstash-plugins/logstash-integration-kafka/pull/150)
3
6
 
4
7
  ## 11.3.1
5
8
  - Fix: update snappy dependency [#148](https://github.com/logstash-plugins/logstash-integration-kafka/pull/148)
@@ -356,7 +356,8 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
356
356
  end
357
357
 
358
358
  def handle_record(record, codec_instance, queue)
359
- codec_instance.decode(record.value.to_s) do |event|
359
+ # use + since .to_s on nil/boolean returns a frozen string since ruby 2.7
360
+ codec_instance.decode(+record.value.to_s) do |event|
360
361
  decorate(event)
361
362
  maybe_set_metadata(event, record)
362
363
  queue << event
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-integration-kafka'
3
- s.version = '11.3.2'
3
+ s.version = '11.3.3'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Integration with Kafka - input and output plugins"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline "+
@@ -301,7 +301,7 @@ def consume_messages(config, queue: Queue.new, timeout:, event_count:)
301
301
  end
302
302
 
303
303
 
304
- describe "schema registry connection options" do
304
+ describe "schema registry connection options", :integration => true do
305
305
  schema_registry = Manticore::Client.new
306
306
  before (:all) do
307
307
  shutdown_schema_registry
@@ -134,6 +134,21 @@ describe LogStash::Inputs::Kafka do
134
134
  it 'should set the consumer thread name' do
135
135
  expect(subject.instance_variable_get('@runner_threads').first.get_name).to eq("kafka-input-worker-test-0")
136
136
  end
137
+
138
+ context 'with records value frozen' do
139
+ # boolean, module name & nil .to_s are frozen by default (https://bugs.ruby-lang.org/issues/16150)
140
+ let(:payload) do [
141
+ org.apache.kafka.clients.consumer.ConsumerRecord.new("logstash", 0, 0, "nil", nil),
142
+ org.apache.kafka.clients.consumer.ConsumerRecord.new("logstash", 0, 0, "true", true),
143
+ org.apache.kafka.clients.consumer.ConsumerRecord.new("logstash", 0, 0, "false", false),
144
+ org.apache.kafka.clients.consumer.ConsumerRecord.new("logstash", 0, 0, "frozen", "".freeze)
145
+ ]
146
+ end
147
+
148
+ it "should process events" do
149
+ expect(q.size).to eq(4)
150
+ end
151
+ end
137
152
  end
138
153
 
139
154
  context 'when errors are encountered during poll' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-integration-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.3.2
4
+ version: 11.3.3
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-16 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement