logstash-input-azure_event_hubs 1.4.7 → 1.4.8

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: 180938c864f4ab3d685ee1780acae884dec1041b1c950b935b12d5a48bf14667
4
- data.tar.gz: 2c411191905591ab555c6dfce60900c27b417bd6832fc72a909a88327d8f926b
3
+ metadata.gz: 534090e6c5ff8c6f47ce9b358069e9ee456b182c12a5bd29e91c7b4afd61bbbf
4
+ data.tar.gz: f2b13ba670593366c8d07fd22175752c954fd26cd5570fc759b9791df83a2e90
5
5
  SHA512:
6
- metadata.gz: c95ed7f2d117194bd58d3ad64dc94e4ec1abe8e5e9bbd9c0baf7d55cabb46be3ee516fc5a17d49e86c8039216d12b97beafcd4adfb6040b42367019f431bc0d8
7
- data.tar.gz: 6d0ef1ef16d8da554cf4caaf1285474015c2e47a51c1afec77fda85c1fb8e568ddaec43a539c658d3614d7916abc0f847419d664df6a3dfb0d967e78ce634ca8
6
+ metadata.gz: 06ca7c423993f970ab2b0e7bdabb6664a2c118189747382beac9dae5a8a9191bdc3d477bc02ea81fc16fd8d8edf95ab5c26ebe40ee0fc004ce9734ab5cd28621
7
+ data.tar.gz: 8b7106c47551404b8d70c499537eee339ffd6fe364c1db124fafe68c2bd0c495b7c1cc4bb07ec7590bfe85452c120c69f8dbafff5acac3826318d9cfc8c21f88
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.4.8
2
+ - Fixed connection placeholder replacements errors with Logstash `8.15.1` and `8.15.2` [#92](https://github.com/logstash-plugins/logstash-input-azure_event_hubs/pull/92)
3
+
1
4
  ## 1.4.7
2
5
  - [DOCS] Clarify examples for single and multiple event hubs [#90](https://github.com/logstash-plugins/logstash-input-azure_event_hubs/pull/90)
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.7
1
+ 1.4.8
@@ -332,8 +332,7 @@ class LogStash::Inputs::AzureEventHubs < LogStash::Inputs::Base
332
332
  connections = *params['event_hub_connections'] # ensure array
333
333
  connections.each.with_index do |_connection, i|
334
334
  begin
335
- connection = self.class.replace_placeholders(_connection) if self.class.respond_to? 'replace_placeholders' # 6.x
336
- connection = self.class.replace_env_placeholders(_connection) if self.class.respond_to? 'replace_env_placeholders' # 5.x
335
+ connection = replace_connection_placeholders(_connection)
337
336
  event_hub_name = ConnectionStringBuilder.new(connection).getEventHubName
338
337
  redacted_connection = connection.gsub(/(SharedAccessKey=)([0-9a-zA-Z=+]*)([;]*)(.*)/, '\\1<redacted>\\3\\4')
339
338
  params['event_hub_connections'][i] = redacted_connection # protect from leaking logs
@@ -361,6 +360,25 @@ class LogStash::Inputs::AzureEventHubs < LogStash::Inputs::Base
361
360
 
362
361
  attr_reader :event_hubs_exploded
363
362
 
363
+ def replace_connection_placeholders(value)
364
+ connection = value
365
+ if self.class.respond_to? :replace_placeholders
366
+ # Logstash 6.x
367
+ if self.class.method(:replace_placeholders).arity == 1
368
+ connection = self.class.replace_placeholders(connection)
369
+ else
370
+ # Logstash 8.15.1 and 8.15.2 changed the method arity including a new boolean parameter `refine`.
371
+ # This was fixed in 8.15.3. see https://github.com/elastic/logstash/pull/16485
372
+ connection = self.class.replace_placeholders(connection, false)
373
+ end
374
+ end
375
+
376
+ # Logstash 5.x
377
+ connection = self.class.replace_env_placeholders(connection) if self.class.respond_to? :replace_env_placeholders
378
+
379
+ connection
380
+ end
381
+
364
382
  def register
365
383
  # augment the exploded config with the defaults
366
384
  @event_hubs_exploded.each do |event_hub|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-azure_event_hubs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-07 00:00:00.000000000 Z
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -17,8 +17,8 @@ dependencies:
17
17
  - !ruby/object:Gem::Version
18
18
  version: '2.0'
19
19
  name: logstash-core-plugin-api
20
- prerelease: false
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
@@ -31,8 +31,8 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  name: logstash-codec-plain
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
@@ -45,8 +45,8 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  name: logstash-codec-json
48
- prerelease: false
49
48
  type: :runtime
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
@@ -59,8 +59,8 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.0.22
61
61
  name: stud
62
- prerelease: false
63
62
  type: :runtime
63
+ prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
@@ -73,8 +73,8 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.0.0
75
75
  name: logstash-devutils
76
- prerelease: false
77
76
  type: :development
77
+ prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.2.33
134
+ rubygems_version: 3.3.26
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Consumes events from Azure Event Hubs for use with Logstash