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
Extract rackup
command, Rack::Server
, Rack::Handler
and related code into a separate gem.
#1937
Conversation
5153e96
to
709d841
Compare
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.
As stated previously, I don't think the benefits of extracting rackup outweigh the backwards compatibility breakage. However, since we've decided to move in that direction, in terms of implementation, this looks mostly fine.
Can you explain why Rack::Handler#{register,[]}
were left? Is it because web servers use those and you don't want to break that? If so, shouldn't both issue deprecation warnings? Ultimately, setting of handlers is for the benefit of rackup, not rack itself, if I understand things correctly. So we would want the webservers to check Rack.release
and:
- For >= 3, if they want to support rackup, switch to
Rackup::Handler
(if only defined, or attempting to require first and defining only if successful?). If they don't want to support rackup, do nothing. - For < 3, continue using
Rack::Handler
.
5752b86
to
867b23c
Compare
rackup
command, Rack::Server
, Rack::Handler
and related code into a separate gem.
Does not work since the rackup extraction (rack#1937).
Does not work since the rackup extraction (#1937).
Related to rack/rack#1937
This test is failing in CI: ``` [sig-builds][Feature:Builds][Slow] s2i build with environment file in sources Building from a template should create a image from "test-env-build.json" template and run it in a pod [apigroup:build.openshift.io][apigroup:image.openshift.io] ``` In rack/rack#1937, rackup was moved to a different gem, which is what the s2i ruby config relies on: https://github.com/sclorg/s2i-ruby-container/blob/master/2.2/s2i/bin/assemble#L52 This adds "rackup" gem.
This test is failing in CI: ``` [sig-builds][Feature:Builds][Slow] s2i build with environment file in sources Building from a template should create a image from "test-env-build.json" template and run it in a pod [apigroup:build.openshift.io][apigroup:image.openshift.io] ``` In rack/rack#1937, rackup was moved to a different gem, which is what the s2i ruby config relies on: https://github.com/sclorg/s2i-ruby-container/blob/master/2.2/s2i/bin/assemble#L52 This adds "rackup" gem.
Should have never took the lobster out
|
Can you share some of the example code that uses this? |
… separate gem in Rack 3.0 refs. rack/rack#1937
This test is failing in CI: ``` [sig-builds][Feature:Builds][Slow] s2i build with environment file in sources Building from a template should create a image from "test-env-build.json" template and run it in a pod [apigroup:build.openshift.io][apigroup:image.openshift.io] ``` In rack/rack#1937, rackup was moved to a different gem, which is what the s2i ruby config relies on: https://github.com/sclorg/s2i-ruby-container/blob/master/2.2/s2i/bin/assemble#L52 This adds "rackup" gem.
This test is failing in CI: ``` [sig-builds][Feature:Builds][Slow] s2i build with environment file in sources Building from a template should create a image from "test-env-build.json" template and run it in a pod [apigroup:build.openshift.io][apigroup:image.openshift.io] ``` In rack/rack#1937, rackup was moved to a different gem, which is what the s2i ruby config relies on: https://github.com/sclorg/s2i-ruby-container/blob/master/2.2/s2i/bin/assemble#L52 This adds "rackup" gem.
We discussed the options here and the general consensus seems to be to extract it. #1928
This PR removes all the rackup specific code into https://github.com/rack/rackup
I've released a v0.1.0 gem for testing, and confirmed it works with this branch.
The following classes were moved:
Rack::Server
->Rackup::Server
Rack::Handler
->Rackup::Handler
. Some minimal function was retained for compatibility.Rack::Lobster
->Rackup::Lobster
.I've moved almost all the code verbatim with minimal changes.
There are several follow up actions but I suggest we make this as direct lift and shift as possible. Later on we can improve
rackup
independently ofrack
.