Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to JRuby 9.4 #14861

Merged
merged 28 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4c618bc
Updates all JRuby and ruby versions references
andsel Jan 23, 2023
cd7073c
Removed usage of deprecated API
andsel Jan 24, 2023
fa2ce1d
Fixed Ruby 3.1 synthax issue in Treetop generated parser
andsel Jan 24, 2023
5147b38
Fixed the other Treetop grammar
andsel Jan 24, 2023
360d1df
Added explicitly dependency on 'thwait' gem (ThreadWait) not anymore …
andsel Jan 24, 2023
d182694
Fixed YAML.load which, to return false on empty string, explicitly ne…
andsel Jan 25, 2023
fcd2a5e
URL.encode to URL.encode_www_form_component
andsel Jan 25, 2023
35b1f9a
Fixed I18N translate method params, doesn't accept anymore a map, is …
andsel Jan 26, 2023
3c580fa
Added e2mmap and thwait gems notices
andsel Jan 30, 2023
5f1b667
JRuby clone accepts optional args
andsel Jan 30, 2023
8b515f4
Refer open method from URI using unique reference
andsel Jan 30, 2023
3a9d0d8
Fixed regexp matching, not clear with it worked properly before
andsel Jan 30, 2023
a34dcb3
Fixed each_slice which from Ruby 3.1 return the original enumeration …
andsel Feb 16, 2023
4a1ea98
Added requirements on thwait gem also on Logstash core
andsel Feb 20, 2023
0808f15
Updated JRuby to 9.4.1.0
andsel Feb 20, 2023
27604f5
Expanded Down.download arguments map
andsel Feb 20, 2023
f40a5f4
Avoid URI.encode_www_form_component which is not like the old URI.enc…
andsel Feb 21, 2023
c48b2a0
Avoid nil in the list of couples used to create an Hash
andsel Feb 23, 2023
a844982
Space between method and parentesys is forbidde
andsel Feb 23, 2023
0db9bfe
User of URI.open instead of Kernel.open and adapted expected error co…
andsel Feb 23, 2023
3b9cdaf
Avoid to remove the rdoc folder from JRuby std which contains rdoc/ve…
andsel Feb 24, 2023
365edcf
Updated JRuby to latest 9.4.2.0
andsel Mar 23, 2023
bafd1e7
Updated JRuby to 9.4.3.0
andsel Jun 8, 2023
a914f5b
Respect the -core JRuby jar introduced with #15050
andsel Jun 15, 2023
19b1da5
More straightforward call to clean the nil
andsel Jun 15, 2023
068a0ba
Update rubyUtils to latest JRuby
andsel Jun 28, 2023
2f0f088
Fixes a waring in the usage of regular expression
andsel Jun 28, 2023
b33d5e8
Fixes compatility warnings coming from concurrent-ruby
andsel Jun 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ COPY LICENSE.txt /opt/logstash/LICENSE.txt
COPY NOTICE.TXT /opt/logstash/NOTICE.TXT
COPY licenses /opt/logstash/licenses
COPY CONTRIBUTORS /opt/logstash/CONTRIBUTORS
COPY Gemfile.template Gemfile.jruby-2.6.lock.* /opt/logstash/
COPY Gemfile.template Gemfile.jruby-3.1.lock.* /opt/logstash/
COPY Rakefile /opt/logstash/Rakefile
COPY build.gradle /opt/logstash/build.gradle
COPY rubyUtils.gradle /opt/logstash/rubyUtils.gradle
Expand Down
1 change: 1 addition & 0 deletions Gemfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ gem "rspec", "~> 3.5", :group => :development
gem "webmock", "~> 3", :group => :development
gem "jar-dependencies", "= 0.4.1" # Gem::LoadError with jar-dependencies 0.4.2
gem "murmurhash3", "= 0.1.6" # Pins until version 0.1.7-java is released
gem "thwait"
2 changes: 1 addition & 1 deletion bin/logstash.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ setup_vendored_jruby() {
fi

if [ -z "$LS_GEM_HOME" ] ; then
export GEM_HOME="${LOGSTASH_HOME}/vendor/bundle/jruby/2.6.0"
export GEM_HOME="${LOGSTASH_HOME}/vendor/bundle/jruby/3.1.0"
else
export GEM_HOME=${LS_GEM_HOME}
fi
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ def bundlerVersion = "~> 2"

tasks.register("installBundler") {
dependsOn assemblyDeps
outputs.files file("${projectDir}/vendor/bundle/jruby/2.6.0/bin/bundle")
outputs.files file("${projectDir}/vendor/bundle/jruby/3.1.0/bin/bundle")
doLast {
gem(projectDir, buildDir, "bundler", bundlerVersion, "${projectDir}/vendor/bundle/jruby/2.6.0")
gem(projectDir, buildDir, "bundler", bundlerVersion, "${projectDir}/vendor/bundle/jruby/3.1.0")
}
}

Expand Down Expand Up @@ -417,7 +417,7 @@ tasks.register("unpackTarDistribution", Copy) {

def qaBuildPath = "${buildDir}/qa/integration"
def qaVendorPath = "${qaBuildPath}/vendor"
def qaBundledGemPath = "${qaVendorPath}/jruby/2.6.0".toString()
def qaBundledGemPath = "${qaVendorPath}/jruby/3.1.0".toString()
def qaBundleBin = "${qaBundledGemPath}/bin/bundle"

tasks.register("installIntegrationTestBundler"){
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def invoke!(options = {})
)
end
# create Gemfile.jruby-1.9.lock from template iff a template exists it itself does not exist
lock_template = ::File.join(ENV["LOGSTASH_HOME"], "Gemfile.jruby-2.6.lock.release")
lock_template = ::File.join(ENV["LOGSTASH_HOME"], "Gemfile.jruby-3.1.lock.release")
if ::File.exists?(lock_template) && !::File.exists?(Environment::LOCKFILE)
FileUtils.copy(lock_template, Environment::LOCKFILE)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/pluginmanager/gem_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module LogStash module PluginManager
# - Generate the specifications
# - Copy the data in the right folders
class GemInstaller
GEM_HOME = Pathname.new(::File.join(LogStash::Environment::BUNDLE_DIR, "jruby", "2.6.0"))
GEM_HOME = Pathname.new(::File.join(LogStash::Environment::BUNDLE_DIR, "jruby", "3.1.0"))
SPECIFICATIONS_DIR = "specifications"
GEMS_DIR = "gems"
CACHE_DIR = "cache"
Expand Down
5 changes: 3 additions & 2 deletions logstash-core/lib/logstash/api/modules/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ class Logging < ::LogStash::Api::Modules::Base
#
# return any unused configurations
def handle_logging(settings)
Hash[settings.map do |key, level|
couplesList = settings.map do |key, level|
if key.start_with?("logger.")
_, path = key.split("logger.")
LogStash::Logging::Logger::configure_logging(level, path)
nil
else
[key, level]
end
end]
end.reject {|value| value.nil?} # skip nil which result in ArgumentError since JRuby 9.4
Hash[couplesList]
end

put "/" do
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/codecs/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def flush(&block)
end

public
def clone
def clone(*args)
LogStash::Plugins::Contextualizer.initialize_plugin(execution_context, self.class, params).tap do |klone|
klone.metric = @metric if klone.instance_variable_get(:@metric).nil?
end
Expand Down
Loading