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

Merge 1.1 into master (redux) #262

Draft
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Jul 18, 2024

Todo

  • Get tests to pass, there are some logger things to figure out, probably screwed up in the merge

kares and others added 30 commits April 27, 2015 21:13
... (this is relevant since Bundler >= 1.10.1)
kares and others added 12 commits August 16, 2022 17:04
* '1.1-stable' of github.com:jruby/jruby-rack:
  [fix] Don't let getSession cause an infinite loop if it throws IllegalStateException (jruby#216)
Old version still uses the removed rubygems.org v1 dependencies
API, which breaks the build.
This fixes jruby#247 without introducing a dependency on the new
catWithCodeRange in JRuby 9.4. It does depend on a now-deprecated
method cat19 that will go away in the next year or so.
…merge-1.1.x-changes

# Conflicts:
#	.travis.yml
#	Appraisals
#	Gemfile
#	Gemfile.lock
#	gemfiles/rails30.gemfile.lock
#	gemfiles/rails31.gemfile.lock
#	gemfiles/rails32.gemfile
#	gemfiles/rails32.gemfile.lock
#	gemfiles/rails40.gemfile
#	gemfiles/rails40.gemfile.lock
#	gemfiles/rails41.gemfile
#	gemfiles/rails41.gemfile.lock
#	gemfiles/rails42.gemfile
#	gemfiles/rails42.gemfile.lock
#	gemfiles/railsNG.gemfile.lock
#	pom.xml
#	src/main/java/org/jruby/rack/RackInput.java
#	src/main/ruby/jruby/rack/booter.rb
#	src/main/ruby/jruby/rack/error_app.rb
#	src/main/ruby/jruby/rack/error_app/show_status.rb
#	src/main/ruby/jruby/rack/response.rb
#	src/main/ruby/jruby/rack/version.rb
#	src/spec/ruby/jruby/rack/booter_spec.rb
#	src/spec/ruby/jruby/rack/rails_booter_spec.rb
#	src/spec/ruby/rack/application_spec.rb
Not really sure these are correct, but they at least seem to match the intend logger changes
and cant see how they were passing earlier given the changes.
@kares
Copy link
Member

kares commented Aug 28, 2024

💯 Chad, this is looking great 💚
indeed, it's been a while since 1.1 was merged to master (mostly due always being in a rush when working on yet another 1.1.x minor release). I was hoping to do some merging and cleanup work on master before 1.2.0 but than the week only has 7 days 😓. think we degraded the "production" quality expectations with the 1.2.x releases, at least for now.

anyways, I am very glad to see the work you did here. maybe some of it is redundant but there are a lot of important fixes that are otherwise missing from master, thus 👍 from me...

@chadlwilson
Copy link
Contributor Author

Thanks @kares, nice to see you!

I think the main thing I could use some input on was the intent of the earlier changes to the way the loggers work across the branches, and whether they are still relevant these days. I wasn't really sure what the main philosophy was for 1.2 so was really just trying to "infer", which is probably a bit tough for me, as not a Rack expert.

For example, in 6abde22 I made the tests pass, but I'm not sure if I am merging something which should only apply to 1.1 and has no role in 1.2 and why I needed to do this. 😅

Given the divergence of the branches, there is a risk of (accidentally) reinstating some historical complexity from 1.1 that was intended to be removed/ignored on 1.2.

Other than that, my intention before un-drafting the PR was

  • to actually sanity test it with at least my "real" application
  • to play around with the examples and appraisals stuff (which I suspect do not work/pass anymore) to understand what confidence they give us and whether it's important to extend that to newer rails versions etc.

I note that the old travis setup seemed to run the appraisals, so at some point they passed, but right now they are not included in the GHA CI which makes me a little nervous. Even if many of those rails versions do not now need to be supported/appraised, it'd probably be good to run at least Rails 6.1 I imagine, while noting that at least in some use cases (#244) Rails 7.0 doesn't currently work right.

But ya, I also got a bit busy in personal life. Will have some more time/space back soon.

@kares
Copy link
Member

kares commented Aug 28, 2024

That looks okay, in terms of the intent of the Logger implementation defaults changing in 1.2.0.

Unfortunately, I am not fully up to speed and do not have an app to test it, but seems the default is not setup to be 100% usable (at least with recent Rails), these days: #260 (comment)

Not sure what is really missing but indeed the idea was that since we JRuby-Rack supports redirecting logging to a Java backend to fully support that, with plain old Ruby Logger that is a bit of a stretch thus the custom impl class...

@enebo
Copy link
Member

enebo commented Sep 1, 2024

@kares @headius so now that we got approval for this what is needed now? Land and release? Should we have some smoketest set up? I feel like this project has languished due to lack of knowing if it is safe to release.

A question I would like answered is how do we QA this? At this point even if we don't answer this I feel like we should release just to get feedback on what else is still broken (forward progress even if wrong probably is right for now). That said, I feel like the lack of confidence is paralyzing our ability to move forward.

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Sep 2, 2024

Interested in your questions also, but give me a week or so to sanity check this? I'm not blocked here, just been very busy moving house so haven't had time to make progress 🙏

I'll have a go at the appraisals but since they are not running on master right now either this doesn't make things "worse" for 1.2 so probably can be decoupled 😅

@kares
Copy link
Member

kares commented Sep 2, 2024

Should we have some smoketest set up? I feel like this project has languished due to lack of knowing if it is safe to release.

I usually had a dummy sample Rails (as well as Sinatra) app that I would deploy to Tomcat as a .war and see how it's doing. Unless of course there were fixes which targeted other servers than I would deploy to multiple ones (e.g. if there was a Jetty related bug report) as needed...

@enebo
Copy link
Member

enebo commented Sep 3, 2024

I usually had a dummy sample Rails (as well as Sinatra) app that I would deploy to Tomcat as a .war and see how it's doing. Unless of course there were fixes which targeted other servers than I would deploy to multiple ones (e.g. if there was a Jetty related bug report) as needed...

@kares I don't doubt there could be a lot of deploys to test all the things supported but even a golden path deploy I think would help improve confidence. At one point I think @mkristian had a bunch of CI tests on jruby/jruby doing some tests with web containers.

@kares
Copy link
Member

kares commented Sep 4, 2024

👍 definitely, I recall those test from the main jruby repo.
although they were a little opaque to debug, the benefits are clear for a project such as jruby-rack.
believe it might be easier these days with something like test-containers (Docker), time is the only enemy 🎐

@mkristian
Copy link
Member

guees they disappeared because they were hard to debug but quite helpful to get JRuby work and ensure to work in different servlet contexts - classloader it was if I remember right

@headius
Copy link
Member

headius commented Sep 24, 2024

I finally dug back to this in my inbox and could help land it... what needs to be done at this point?

@chadlwilson
Copy link
Contributor Author

I finally dug back to this in my inbox and could help land it... what needs to be done at this point?

@headius At the moment I think it's on me to sanity check this in a real environment, plus look at the appraisals.

I did an initial sanity test with GoCD and #259 is definitely fixed. However right now I am having a weird problem with expected session cookies not being set by browser on some Rack-managed routes leading to duplicate Jetty session creation on some routes (which then causes Jetty failures) which I am trying to solve. I need to verify it is related to changes made on 1.2 branch or something else that's gone wroing in my env (perhaps incorrect Set-Cookie from server).

@headius
Copy link
Member

headius commented Oct 10, 2024

Ok give me a shout if there's any way I can help!

@chadlwilson
Copy link
Contributor Author

The problem above with my sanity test is unrelated to this change - there is some Firefox Total Cookie Protection change causing an issue with a same site iframe on http://localhost that doesn't happen in a real environment. Sigh :)

All seems to be working fine with jruby-rack so far with GoCD locally.

Will move on to see what I can do with the appraisals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoMethodError undefined method get_header re-emerged with JRuby Rack 1.2.2
10 participants