-
Notifications
You must be signed in to change notification settings - Fork 137
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
Merge 1.1 into master (redux - with all specs passing + bumped dependency minor versions) #262
Conversation
... (this is relevant since Bundler >= 1.10.1)
836e5f0
to
7e15e72
Compare
From my perspective, this is ready to go now (or as good as it's productive to get for now). I'll create a separate draft PR for the appraisals (basically that runs tests alongside Rails versions as the old Travis build did) and see if anyone can help me work on it/fix them :-) |
@chadlwilson This is great, thank you for your help! I think it's probably fine to merge now and we'll deal with the appraisals separately. @kares What do you think? Shall we go ahead and merge? I know folks have been waiting on another release with recent patches and 1.1 stuff merged forward. |
I was not able to deploy 2 rails app to same tomcat9 with java 11 with this version of jruby-rack Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'int org.jruby.RubyString.cat19(org.jruby.util.ByteList, int)' the class loader 'bootstrap' of the current class, java/lang/Object, and the class loader org.apache.catalina.loader.ParallelWebappClassLoader @53811376 for the method's defining class, org/jruby/RubyString, have different Class objects for the type org/jruby/util/ByteList used in the signature (java.lang.Object is in module java.base of loader 'bootstrap'; org.jruby.RubyString is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @53811376, parent loader java.net.URLClassLoader @22d8cfe0) We are currently running version master...jlahtinen:jruby-rack:kvp5 that allows to deploy more than 1 rails app to same tomcat9 |
@jlahtinen While its hard to tell for sure, I'm not aware of anything changed in these changes from 1.1.x over the years that would materially change whether your hack in fdbcf6a would work before/after these changes? That error looks like there are perhaps two different underlying JRuby versions being loaded somehow, given it is complaining about ...unless it's something to do with the loggers.... it's been quite a while since I tangled with Tomcat classloaders. |
Maybe that error ok to have after merging this. And lets resolve this multiple rails apps later? |
@jlahtinen I concur with @chadlwilson... that error seems like you have two copies of JRuby loading. Perhaps there's a JRuby jar in the bootstrap jars for Tomcat? For multi-app deployments, there should really only be the copies in each app and not a global one. That method (RubyString.cat19) exists but is deprecated in 9.4 (replacement is catWithCodeRange added in 9.4.7.0). It will be removed in JRuby 11 (or whatever big release comes after 10.0). We should update jruby-rack to use the replacement method at some point, but it has been around for a long time. |
I think we do not have a global one there. Can you spot anything else that could be the reason?
Another app works and another fails to
|
Chad has done a great job here, the actual production affecting changes are all from a stable 1.1 release, thus I am in favor of merging and cutting a new release. The LinkageError is unclear, does not seem like changes in this PR would cause that and should potentially be a separate ticket. |
Merged! @jlahtinen Let's get your issue in a separate report and figure it out quickly before a release. |
@chadlwilson Yeah good idea. @jlahtinen @kares Anything extra we should include before release? |
Actually as it turns out, I had a revelation as of yesterday and I think I have figured out #244 as well as gotten the appraisals to pass in a number of configurations. Working on it at chadlwilson#1 Actually I'm still rather confused about how any of 1.1.x or 1.2.2 works with rack 2.x and any modern Rails version to be honest, given the changes in rack sessions and store usage 😅 |
I think only thing that affects our projects is how logging is different in puma. I started that work in #270 |
the servlet session store is an optional feature, so it's not really involved unless you configure it.
because you use the Rails defaults in Puma, however jruby-rack has to support embedded deployments and thus the I would just ship Chad's changes and hopefully we'll have some time for PR reviews later. |
I have all the appraisals working now on rails 5.0 through 7.2, with a change that makes things rack 2.x only (3.x doesn't work for other reasons) Ill open a PR for that now, and we can discuss if we are fine dropping hacks for rack 1.x |
(Rails 8 won't work until st least JRuby 10 as it drops 3.1 compatibility) |
See #271 |
Thanks for the answer. Any tips how to find what is the default logger in puma. So how to make sure logger stays the same rails default in puma and jruby-rack case? |
1.2
across Java 8/11/17/21 and both JRuby 9.3 and 9.41.2.x
that caused logs to be duplicated multiple times (and also caused a failing test)