-
Notifications
You must be signed in to change notification settings - Fork 206
Fix integration tests for JRuby 9.4 and 10.0 #567
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, I'll start the tests!
Woah nice! |
I don't know what's happening on CI. The test using Java 21 with JRuby 10 (https://github.com/jruby/warbler/actions/runs/16350097899/job/46216486292?pr=567) passes without issues on my local machine. However, the other integration test fails with Java 8 and JRuby 9.4 on my development machine as well. The error appears to be caused by the ScriptingContainer.class being compiled with Java 21 (class file version 65), which is incompatible with Java 8 (max class file version 52). So the issue likely stems from using a JRuby JAR (jruby-core-*.jar) that was built with a newer Java version than the runtime used during test execution. I assume that every new version of JRuby is built with something newer than Java 8, so how to fix this? |
Removed |
The (21, jruby-9.4, integration) AND the (8, jruby-9.4, integration) fail on: "ERROR: Error installing /home/runner/.m2/repository/rubygems/bundler/2.7.1/bundler-2.7.1.gem: bundler-2.7.1 requires Ruby version >= 3.2.0. The current ruby version is 3.1.4." |
I've now tried adding |
That didn’t work either. The only thing that seems to have any effect is adding However, adding Also, as @mjansing already pointed out, the JRuby 9.4 integration tests still fail when run with Java 8. So unfortunately, I can't get all tests to pass at the same time — sorry! |
I was able to reproduce it locally (Java 8, JRuby 9.4), but for some reason Maven invoked something (I guess This is really annoying. Older builds (e.g., this one) were green simply because Bundler 2.7 wasn't released when the action ran. |
I'm out of the office quite a bit this week but once I'm back at work I'll see if I can help iron out these remaining issues. |
This prevents Maven from producing unused JAR or WAR files during the build. However, we now need to check in the target directories manually, as they are no longer created automatically before warbling.
The old Jetty 6.1 plugin used an outdated Servlet API, which caused compatibility issues with modern WAR files. Jetty 8.1 includes a more recent API version and still allows background startup via the legacy Mortbay plugin. Newer Jetty Maven plugins maintained by Eclipse (e.g. jetty-maven-plugin 9.x–11.x) no longer support background (daemon) mode, which makes them unsuitable for integration tests in this setup.
All tests are passing except for the Java 8 one. I haven’t yet figured out what’s triggering the compilation or download of a class that isn’t Java 8 compatible. |
Since the `gem-maven-plugin` attempts to install the latest Bundler version by default, we need to explicitly freeze it for compatibility with older ruby versions
Sorry for the repeated force pushes — I just didn’t want to mess up the Git history. As of now, the integration tests are always run with Bundler 2.6.3 and JRuby 9.4, even if JRuby 10 is used externally. Since the integration tests don’t have any Gemfile.lock files, this setup should be fine for now. |
I added logic to ensure that the currently active JRuby and Bundler versions are also used for the dependencies in the integration tests. That’s good enough for now from my side. @headius had removed support for running tests with different Bundler versions in the GitHub Actions configuration — I’ve restored that and added an example entry using Bundler 2.7.1 with JRuby 10. Since we’ve experienced issues in some of our projects when using Bundler versions other than 2.6.3, this setup might help us reproduce those problems during testing. For now, though, everything is green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💟 awesome work!
Is there anything blocking this merge so we can have a working infrastructure? It would really help to proceed with further work. |
I read the change again, and refreshed my memory and merged this change. |
Thank you. 🎉 |
This PR fixes the previously broken integration test setup and ensures it now runs successfully with JRuby 9.4 and JRuby 10.
Gemfile
,bundle install
, andrakefile
fixesbundler
version in Mavenfile to avoid install drift<packaging>
topom
to avoid generating unnecessary.jar
/.war
artifactstarget/
directory handling beforewarble
build<daemon>true</deamon>