logstash-integration-elastic_enterprise_search 3.0.1 → 3.0.3

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: b4473449751c6ce422faa5cdbbcec12e78677a54d40209e397c987d2e2e2d05f
4
- data.tar.gz: d1774ea9414e64b243017fa4faac4a53c830b66098208762bb601d9e3a9ac834
3
+ metadata.gz: 3af93305f2ae422c91b82ccebe11ffc81f933a3e91c7e302537aa1e1583bac35
4
+ data.tar.gz: 350ddeeab933a4083137c5c618e186c6a7b25634c3153382f1723030818f969f
5
5
  SHA512:
6
- metadata.gz: 8ed463da5b8975c4765a4688e684e2596a42161128a6bee3f087eff49a6404180051967e6c96f7893581bd7322ff13bdb2d8251f967b8b35496e4b85503e1f83
7
- data.tar.gz: e0fcd1f80a3cd350508d9d78922a67e26fc31e01d0433f2fa764033fc2778925b0a8ebebd48e95802718047162630e2d65124395cbd7c7989a7182ce9482e429
6
+ metadata.gz: '097e1f1e9f13be33fd10d81cc606684dcfe8a9f605af21e6638abf55c17c77f3f1b9d0ec76089e8129fd7efe5a7553ec40e0155406ea47b8b7c126b3aa816522'
7
+ data.tar.gz: a9f34fbfccb259956dfb8efd8cdc0f7a43bca64364711f84f9a59c992022cd87041e7090698e5b91d092e837184583e823a19b46468fe26355919d65ecd9efad
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 3.0.3
2
+ - Allow enterprise-search dependency to pull 8.19 and newer versions [#27](https://github.com/logstash-plugins/logstash-integration-elastic_enterprise_search/pull/27)
3
+
4
+ ## 3.0.2
5
+ - Upgrades `elastic-enterprise-search` gem and tolerates `Elastic::Transport` client [#26](https://github.com/logstash-plugins/logstash-integration-elastic_enterprise_search/pull/26)
6
+
1
7
  ## 3.0.1
2
8
  - Add deprecation log for App Search and Workplace Search. Both products are removed from Elastic Stack in version 9 [#22](https://github.com/logstash-plugins/logstash-integration-elastic_enterprise_search/pull/22)
3
9
 
@@ -4,14 +4,29 @@ module LogStash::PluginMixins::EnterpriseSearch
4
4
  # It also provides common Manticore configurations such as :ssl.
5
5
  module ManticoreTransport
6
6
  def self.included(base)
7
- if eps_version_7?
7
+ load_transport!
8
+
9
+ raise ArgumentError, "`#{base}` must inherit Elastic::EnterpriseSearch::Client" unless base < Elastic::EnterpriseSearch::Client
10
+ raise ArgumentError, "`#{base}` must respond to :params" unless base.instance_methods.include? :params
11
+ end
12
+
13
+ # `elasticsearch-transport` is old, `elastic-transport` is the replacement.
14
+ # LS-core updated `elasticsearch` > 8: https://github.com/elastic/logstash/pull/17161
15
+ # Following logic supports both `elasticsearch-transport` and `elastic-transport` gems.
16
+ def self.load_transport!
17
+ return if @transport_loaded
18
+ begin
8
19
  require 'elasticsearch/transport/transport/http/manticore'
9
- else
20
+ @use_legacy_transport = true
21
+ rescue LoadError
10
22
  require 'elastic/transport/transport/http/manticore'
23
+ @use_legacy_transport = false
11
24
  end
25
+ @transport_loaded = true
26
+ end
12
27
 
13
- raise ArgumentError, "`#{base}` must inherit Elastic::EnterpriseSearch::Client" unless base < Elastic::EnterpriseSearch::Client
14
- raise ArgumentError, "`#{base}` must respond to :params" unless base.instance_methods.include? :params
28
+ def self.use_legacy_transport?
29
+ @use_legacy_transport
15
30
  end
16
31
 
17
32
  # overrides Elastic::EnterpriseSearch::Client#transport
@@ -33,22 +48,17 @@ module LogStash::PluginMixins::EnterpriseSearch
33
48
  )
34
49
  end
35
50
 
36
- def self.eps_version_7?
37
- Elastic::EnterpriseSearch::VERSION.start_with?('7')
38
- end
39
-
40
51
  private
41
52
 
42
53
  def manticore_transport_klass
43
- ManticoreTransport.eps_version_7? ? Elasticsearch::Transport::Transport::HTTP::Manticore : Elastic::Transport::Transport::HTTP::Manticore
54
+ ManticoreTransport.use_legacy_transport? ? Elasticsearch::Transport::Transport::HTTP::Manticore : Elastic::Transport::Transport::HTTP::Manticore
44
55
  end
45
56
 
46
57
  def transport_klass
47
- case Elasticsearch::Transport::VERSION
48
- when /^7\.1[123]/
49
- Elasticsearch::Client
50
- else
58
+ if ManticoreTransport.use_legacy_transport?
51
59
  Elasticsearch::Transport::Client
60
+ else
61
+ Elastic::Transport::Client
52
62
  end
53
63
  end
54
64
 
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-integration-elastic_enterprise_search'
3
- s.version = '3.0.1'
3
+ s.version = ::File.read('version').split("\n").first
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Integration with Elastic Enterprise Search - output plugins"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline "+
7
7
  "using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program."
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
- s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
10
+ s.homepage = "https://www.elastic.co/logstash"
11
11
  s.require_paths = ['lib', 'vendor/jar-dependencies']
12
12
 
13
13
  # Files
@@ -27,7 +27,8 @@ Gem::Specification.new do |s|
27
27
  s.add_runtime_dependency "manticore", '~> 0.8'
28
28
  s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
29
29
  s.add_runtime_dependency "logstash-codec-plain"
30
- s.add_runtime_dependency 'elastic-enterprise-search', '>= 7.16', '< 9'
30
+ # elastic-enterprise-search is deprecated in v9 and gem for v9 is not released yet
31
+ s.add_runtime_dependency 'elastic-enterprise-search', '~> 8.19'
31
32
  s.add_runtime_dependency "logstash-mixin-deprecation_logger_support", '~>1.0'
32
33
  s.add_development_dependency "logstash-devutils"
33
34
  end
@@ -29,7 +29,7 @@ describe LogStash::PluginMixins::EnterpriseSearch::ManticoreTransport do
29
29
 
30
30
  result = client.transport
31
31
 
32
- if LogStash::PluginMixins::EnterpriseSearch::ManticoreTransport.eps_version_7?
32
+ if LogStash::PluginMixins::EnterpriseSearch::ManticoreTransport.use_legacy_transport?
33
33
  expect(result.transport).to be_a(Elasticsearch::Transport::Transport::HTTP::Manticore)
34
34
  else
35
35
  expect(result.transport).to be_a(Elastic::Transport::Transport::HTTP::Manticore)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-integration-elastic_enterprise_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2026-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -55,23 +55,17 @@ dependencies:
55
55
  - !ruby/object:Gem::Dependency
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '7.16'
61
- - - "<"
58
+ - - "~>"
62
59
  - !ruby/object:Gem::Version
63
- version: '9'
60
+ version: '8.19'
64
61
  name: elastic-enterprise-search
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- version: '7.16'
72
- - - "<"
66
+ - - "~>"
73
67
  - !ruby/object:Gem::Version
74
- version: '9'
68
+ version: '8.19'
75
69
  - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
@@ -134,7 +128,7 @@ files:
134
128
  - spec/unit/outputs/elastic_app_search_spec.rb
135
129
  - spec/unit/outputs/elastic_workplace_search_spec.rb
136
130
  - spec/unit/outputs/manticore_transport_spec.rb
137
- homepage: http://www.elastic.co/guide/en/logstash/current/index.html
131
+ homepage: https://www.elastic.co/logstash
138
132
  licenses:
139
133
  - Apache-2.0
140
134
  metadata: