logstash icon indicating copy to clipboard operation
logstash copied to clipboard

JRuby 9.4.12.1 upgrade

Open jsvd opened this issue 1 year ago • 2 comments

  • [x] upgrade to jruby 9.4.12.1
  • [x] cleanup broken requires
  • [x] add license entry and notices for multiple core gems like pp, drb, etc.
  • [ ] address changes to bundler and rubygems

jsvd avatar Jan 31 '25 13:01 jsvd

I'm going to go ahead and replace 9.4.12.0 with 9.4.12.1 if thats allright with you @robbavey and @jsvd

I took over https://github.com/elastic/logstash/pull/16986 and opened a WIP to start seeing things in CI etc at https://github.com/elastic/logstash/pull/17696

donoghuc avatar Jun 02 '25 23:06 donoghuc

We got another Jruby release! 9.4.13.0. I want to provide an overview of where we are at currently and go over results of looking at taking up the latest version.

Here are the biggest updates we need to deal with to take up 9.4.12.1 (and 9.4.13.0):

  1. We had been explicitly overriding some default gems for security compliance, with the latest jruby release we can remove some of those pins ✅
  2. The default gem set changed and there are some license checker updates required ✅
  3. File loading behavior changes require some explicity requires where previously those were already loaded (for example where previously we could call a to_set on an Array assuming require 'set' was already executed, changes in loading invalidated that and now require 'set' is required. ✅
  4. Some error handling needs to be updated based on a refactor in jruby https://github.com/rubygems/rubygems/commit/23b828c9f10311238701497c00284a7c9920443b Specifically https://github.com/elastic/logstash/pull/17696/files#r2136596098 ✅
  5. There has been some changes to bundler we need to adapt to. We are monkey patching some code that was changed and predictably that is breaking the pluginmanager functionality. The PR that breaks us is https://github.com/rubygems/rubygems/pull/8027/files. In addition to this change there have been a couple other changes to that code base that we need to consider: https://github.com/rubygems/rubygems/pull/8027/files has landed and https://github.com/rubygems/rubygems/commit/152331a9dc4097a4393c2c86423944d7d8cf5688 is coming (not yet released). From my initial look it appears that the path forward will be to remove the patch entirely. Doing this produces errors where bundler is complaining about modifying a lock file. I think the path forward will be to dig in to exactly what that conflict is and solve it in our pluginmanager code instead of patching. ❌
  6. A quick spike on 9.4.13.0 shows that updating to latest will be trivial and will actually carry some important updates. ✅

donoghuc avatar Jun 13 '25 18:06 donoghuc

Jruby 9.4.13.0 is in the logstash 9.1 branch and has been producing green CI runs. Manual testing led to a few minor issues being raised and subsequently fixed but that has concluded. Closing as done!

donoghuc avatar Jul 07 '25 20:07 donoghuc