From 47461192b8bd513ca53dfa6344a20ecd2a3d2d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Fri, 11 Oct 2024 11:51:17 +0100 Subject: [PATCH 1/4] update elasticsearch ruby client to 8.x --- logstash-core/logstash-core.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logstash-core/logstash-core.gemspec b/logstash-core/logstash-core.gemspec index a234b3cd625..1789a5d0dcf 100644 --- a/logstash-core/logstash-core.gemspec +++ b/logstash-core/logstash-core.gemspec @@ -72,7 +72,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency "jrjackson", "= #{ALL_VERSIONS.fetch('jrjackson')}" #(Apache 2.0 license) - gem.add_runtime_dependency "elasticsearch", '~> 7' + gem.add_runtime_dependency "elasticsearch", '~> 8' gem.add_runtime_dependency "manticore", '~> 0.6' # xpack geoip database service From ea3ac2723055b0280d4f412af5b7a507958f4119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Fri, 11 Oct 2024 14:03:55 +0100 Subject: [PATCH 2/4] update faraday and transport --- Gemfile.template | 2 +- logstash-core/lib/logstash/elasticsearch_client.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.template b/Gemfile.template index 66eea71b5f2..0d7f83c2f96 100644 --- a/Gemfile.template +++ b/Gemfile.template @@ -13,7 +13,7 @@ gem "ruby-maven-libs", "~> 3", ">= 3.9.6.1" gem "logstash-output-elasticsearch", ">= 11.14.0" gem "polyglot", require: false gem "treetop", require: false -gem "faraday", "~> 1", :require => false # due elasticsearch-transport (elastic-transport) depending faraday '~> 1' +gem "faraday", "~> 2", :require => false gem "minitar", :group => :build gem "childprocess", "~> 4", :group => :build gem "fpm", "~> 1", ">= 1.14.1", :group => :build # compound due to bugfix https://github.com/jordansissel/fpm/pull/1856 diff --git a/logstash-core/lib/logstash/elasticsearch_client.rb b/logstash-core/lib/logstash/elasticsearch_client.rb index 7a79efa1666..e2fc17ff2e8 100644 --- a/logstash-core/lib/logstash/elasticsearch_client.rb +++ b/logstash-core/lib/logstash/elasticsearch_client.rb @@ -16,7 +16,7 @@ # under the License. require "elasticsearch" -require "elasticsearch/transport/transport/http/manticore" +require "elastic-transport" require 'logstash/util/manticore_ssl_config_helper' require 'logstash/util/password' From 1130e2e89e384d88a88e92348bd467523d47b8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Fri, 11 Oct 2024 14:26:36 +0100 Subject: [PATCH 3/4] add logger license --- .../src/main/resources/licenseMapping.csv | 1 + .../main/resources/notices/logger-NOTICE.txt | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tools/dependencies-report/src/main/resources/notices/logger-NOTICE.txt diff --git a/tools/dependencies-report/src/main/resources/licenseMapping.csv b/tools/dependencies-report/src/main/resources/licenseMapping.csv index f46ecf4ab80..213b183c541 100644 --- a/tools/dependencies-report/src/main/resources/licenseMapping.csv +++ b/tools/dependencies-report/src/main/resources/licenseMapping.csv @@ -100,6 +100,7 @@ dependency,dependencyUrl,licenseOverride,copyright,sourceURL "jruby-stdin-channel:","https://github.com/colinsurprenant/jruby-stdin-channel",Apache-2.0 "jwt:",https://github.com/jwt/ruby-jwt,MIT "json:",http://json-jruby.rubyforge.org/,Ruby +"logger:","https://github.com/ruby/logger",BSD-2-Clause "lru_redux:","https://github.com/SamSaffron/lru_redux/",MIT "mail:","https://github.com/mikel/mail/",MIT "manticore:","https://github.com/cheald/manticore/",MIT diff --git a/tools/dependencies-report/src/main/resources/notices/logger-NOTICE.txt b/tools/dependencies-report/src/main/resources/notices/logger-NOTICE.txt new file mode 100644 index 00000000000..66d93598aa3 --- /dev/null +++ b/tools/dependencies-report/src/main/resources/notices/logger-NOTICE.txt @@ -0,0 +1,22 @@ +Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. From 77e0816fbbb3bd970d8df68fb76a117f42b87360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Fri, 11 Oct 2024 15:36:40 +0100 Subject: [PATCH 4/4] fix qa tests --- qa/integration/services/elasticsearch_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/qa/integration/services/elasticsearch_service.rb b/qa/integration/services/elasticsearch_service.rb index 56642cfc311..e9b316ae9e0 100644 --- a/qa/integration/services/elasticsearch_service.rb +++ b/qa/integration/services/elasticsearch_service.rb @@ -16,6 +16,7 @@ # under the License. require 'elasticsearch' +require 'elastic-transport' require_relative '../specs/spec_helper' class ElasticsearchService < Service