Repository navigation
Run Grape behind Falcon in CI - #3053
Open
ericproulx wants to merge 1 commit into
Open
ericproulx wants to merge 1 commit into
ericproulx wants to merge 1 commit into
Conversation
ericproulx
force-pushed
the
falcon_integration
branch
from
November 2, 2026 23:54
82c2e8c to
786bca1
Compare
Danger ReportNo issues found. |
Member
|
Rather than putting this here, I think you should build something like grape-on-falcon, similar to https://github.com/ruby-grape/grape-on-rack, https://github.com/ruby-grape/grape-on-goliath and https://github.com/ruby-grape/grape-on-rails. We could have integration tests in grape proper, too, but then I'd add the entire spectrum of servers. |
ericproulx
force-pushed
the
falcon_integration
branch
3 times, most recently
from
November 9, 2026 09:11
a688784 to
b22e0b5
Compare
Add gemfiles/falcon.gemfile and spec/integration/falcon, run on Ruby 3.3, 3.4 and 4.0. The specs start a real Falcon server in-process on a free port and send it requests with async-http's client: - 30 concurrent requests, which pause in a before filter, an after filter, a custom validator inside array elements and the route block, each keep their own params, endpoint instance variables and validation error index. - error! inside an Async task the route waits on responds with its status, with and without rescue_from :all (#3023). - stream sends each chunk of an Enumerator before the endpoint produces the next. Each spec fails under a matching break: a per-thread ParamScopeTracker, one endpoint shared by every request, error! throwing instead of raising, Halt as an Exception rather than a StandardError, and a stream body read into an Array. A client disconnect or a server stop doesn't cancel a running endpoint: async-http's servers run the app under defer_stop, so there is no cancellation to spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ericproulx
force-pushed
the
falcon_integration
branch
from
November 10, 2026 10:52
b22e0b5 to
248e08a
Compare
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.
Summary
First step toward official Falcon support: a CI job that fails if Grape stops working behind a fiber server. A README section on running Grape under Falcon comes in a separate PR.
gemfiles/falcon.gemfileplusspec/integration/falcon, run on Ruby 3.3, 3.4 and 4.0. The file skips itself without Falcon (if: defined?(Falcon)), so the other jobs andedge.ymldon't load it.Falcon::Serverin-process on a free port and send it requests with async-http's client:beforefilter, anafterfilter, a custom validator inside array elements and the route block. Each keeps its own params, endpoint instance variables and validation error index.error!in a child task: inside anAsynctask the route waits on,error!responds with its status, with and withoutrescue_from :all(Raise from error! instead of throwing :error #3023).streamsends each chunk of an Enumerator before the endpoint produces the next. The producer waits for the client to have each chunk, so a buffered body gets no acknowledgements, and a timeout makes that a failure instead of a hang.Mutation check
ParamScopeTrackeronThread#thread_variable_*instead ofFiber[]@prototype.dup)error!throwing:errorinstead of raisingHalterror!specsHalt < Exceptionerror!specsstreambody read into an ArrayNot covered: cancellation
A client disconnect or a server stop doesn't cancel a running endpoint. async-http 0.105's HTTP/1 and HTTP/2 servers both run the app under
defer_stop, so the endpoint runs to completion (verified over HTTP/1 for both cases). There's no cancellation to spec.Test plan
bundle exec rake(RuboCop and the full suite) passes locally.BUNDLE_GEMFILE=gemfiles/falcon.gemfile bundle exec rspec spec/integration/falconpasses on Ruby 3.3.12, 3.4.9 and 4.0.9, including with--enable=frozen-string-literal, and passed 12 runs in a row on 4.0.9.🤖 Generated with Claude Code