Draft
Conversation
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label. Could you fix it @jsvd? 🙏
|
Update from JRuby 10.0.2.0 to 10.0.3.0 and fix all compilation and test failures introduced by JRuby 10 and Ruby 3.4 changes. Java fixes: - RubyArray.op_plus no longer accepts ThreadContext parameter Ruby 3.4 compatibility: - Add observer gem dependency (removed from stdlib) - Fix bundler platform detection for universal-java (no version suffix) - Update artifact build tasks gem paths from 3.1.0 to 3.4.0 Test fixes for Ruby 3.4 behavior changes: - TypeError message wording changed - NoMethodError format uses single quotes instead of backticks - Exception#error alias removed; use Gem::SourceFetchProblem wrapper
Migrate all deprecated JRuby 9.x API calls to their JRuby 10 equivalents across 39 source files and 19 test files. The key changes are: - RubyNumeric.num2int/num2dbl → Convert.toInt/toDouble(context, ...) - RubyBoolean.newBoolean(runtime, b) → Convert.asBoolean(context, b) - runtime.newArray()/newArray(int) → Create.newArray/allocArray(context, ...) - RubyArray.append/push(obj) → append/push(context, obj) - RubyArray.toJavaArray() → toJavaArray(context) - RubyString.intern() → intern(context) - RubyNumeric.getLongValue/getDoubleValue → asLong/asDouble(context) - RubyModule.defineAnnotatedMethods → defineMethods(context, ...) - RubyModule.defineAnnotatedConstants → defineConstants(context, ...) - RubyModule.setConstant/defineConstant → setConstant/defineConstant(context, ...) - RubyModule.defineOrGetModuleUnder(s) → defineOrGetModuleUnder(context, s, null, -1) - Ruby.getOrCreateModule(s) → Define.defineModule(context, s) - Ruby.getModule(s) → Access.getModule(context, s) - Ruby.getClass(s) → Access.getClass(context, s) - Ruby.defineClass(...) → Define.defineClass(context, ...) - RubyBasicObject.to_s()/method(arg) → to_s(context)/method(context, arg, null) - Java.getProxyClass(ruby, cls) → getProxyClass(context, cls) - RubyTime.newTimeFromNanoseconds(ruby, n) → newTimeFromNanoseconds(context, n) Re-enables -Werror in build.gradle now that all warnings are resolved.
- Add csv gem dependency (removed from Ruby 3.4 default gems) - Replace File::exists? with File.exist? (removed in Ruby 3.4)
Add resolv, syntax_suggest, syslog, and tempfile to the dependency license report, with corresponding NOTICE files.
Prepend vendored JRuby bin to PATH instead of appending, so the vendored `gem` command is found before rbenv shims. This fixes the `preparePluginTestFixtures` task failing with "rbenv: version 'jruby-10.0.3.0' is not installed" in CI environments where rbenv is initialized.
Read JDK version from .ci/java-versions.properties instead of hardcoding the default JDK path, which pointed to JDK 17. JRuby 10 class files require JDK 21 to compile against.
In Ruby 3.4 (JRuby 10), bigdecimal was removed from the default gems. The integration tests have their own vendored gem environment, so bigdecimal must be declared explicitly in the gemspec since jrjackson depends on it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 0571354.
- Use getName() instead of getBaseName() in LoggableExt.java to get full qualified class names (e.g., 'LogStash::Filters::Grok' instead of just 'Grok') - Fix exception type checking in Logstash.java to properly detect Bundler::ProductionError using getName() - Update deprecation_log_spec.rb test pattern to match full logger name (deprecation.logstash.filters.ruby instead of deprecation.ruby) This fixes the issue where JRuby 10 was truncating logger names, resulting in only ~7 loggers in the monitoring API instead of ~70+ plugin-specific loggers.
Replace stored currentContext with getCurrentContext() at point of use to avoid null reference exceptions when codecs are called from different threads. Problem: NullPointerException - "Cannot invoke RubyThread.setErrorInfo() because this.thread is null" when codec decode/encode methods are called from different thread contexts. JRuby 10 stales the thread reference when context is reused across threads. Solution: Use RubyUtil.RUBY.getCurrentContext() at point of use in: - decode() method: Get current context before creating Block - encode() method: Get current context before calling Ruby methods - cloneCodec() method: Pass current context to new instance Fixes input/output Java plugin tests using Ruby codecs.
Remove wait_for_logstash and wait_for_rest_api calls for generator-based test. The generator with count => 4 exits immediately, causing the REST API check to timeout. Instead, just wait briefly for process completion before teardown.
Update regex patterns and skip parameters to match new logger names from JRuby 10 fix: - pipeline_log_spec.rb: Update javapipeline logger name pattern to logstash.javapipeline - monitoring_api_spec.rb: Add skip parameter for licensereader logger to all assertions
…tions The licensechecker.licensereader logger has special logging behavior and should be skipped in all logging level assertions, not just the initial checks.
Changed from setting only logger.deprecation.logstash to setting logger.deprecation, which ensures all deprecation loggers (including deprecation.ruby) are set to ERROR level after the JRuby 10 logger name changes.
…ctory Add settings configuration to ensure logs are written to temp_dir for verification.
…path The spawn_logstash call needs --path.settings to use the configured log directory, unlike start_with_stdin which handles this automatically.
…erators Check if log file exists before attempting to read, since generator-based tests with fast completion may exit before logs are fully flushed to disk.
Member
Author
|
/run exhaustive tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.