-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Don't run integration tests on Falcon against TruffleRuby #1839
Conversation
I guess this is in response to truffleruby-head (truffleruby 23.0.0-dev-a645f1b5) failing at https://github.com/sinatra/sinatra/actions/runs/3447564172/jobs/5753892737#step:5:14, right? Sure, I guess it makes some sense How come truffleruby (truffleruby 22.3.0) does not fail at https://github.com/sinatra/sinatra/actions/runs/3447564172/jobs/5753892621#step:5:19? Is falcon behaving differently on Ruby 3.0.x than 3.1.x? |
Yeah, exactly
Good question. I haven't noticed that specs passed on TruffleRuby 22.3.0 (CRuby 3.0). Indeed, falcon behaves differently on Ruby 3.0 and Ruby 3.1. On Ruby 3.0 falcon depends on async 1.30.3 that doesn't use |
Is it possible to conditionally |
Yeah, tests fail too early - when a falcon server is run. It happens before any integration test case is executed when sinatra/test/integration_helper.rb Lines 121 to 128 in cafaab9
We may print some warning (when remove the falcon server from the servers list) to make this skipping more explicit. Will it be helpful? |
Sounds good to me (FYI it is up to @jkowens to merge this as I don't have such access) |
2f0beef
to
09ee32f
Compare
@jkowens Could you please take a look and merge if it looks OK? |
09ee32f
to
42e3eed
Compare
Thank you! |
@andrykonchin thanks for the PR 👍 |
servers = Sinatra::Base.server.dup | ||
|
||
# TruffleRuby doesn't support `Fiber.set_scheduler` yet | ||
unless Fiber.respond_to?(:set_scheduler) |
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.
Unfortunately, this check also skips falcon tests on MRI Ruby <3.0
$ chruby-exec 2.7.7 -- ruby -e 'p Fiber.respond_to?(:set_scheduler)'
false
falcon has an open requirement on async, async since version 2.0 requires Ruby >=3.1.1 (https://rubygems.org/gems/async/versions/2.0.0). It should be possible to still run these tests on Ruby 2.x, don't you think @andrykonchin? It will just run falcon using async 1.x
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.
Right, so probably we should check explicitly for RUBY_ENGINE == "truffleruby"
here.
TruffleRuby master has RUBY_VERSION 3.1 but doesn't support Fiber.set_scheduler yet.
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.
So:
if RUBY_ENGINE == "truffleruby" && !Fiber.respond_to?(:set_scheduler)
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.
I've prepared a PR with the fix (#1852).
Hello.
TruffleRuby doesn't support
Fiber.set_scheduler
method so it will be great not to run tests (temporary) that involve this method call on TruffleRuby.Right now only integration tests with Falcon rely on this method so here in this PR Falcon server is skipped in tests if
Fiber.set_scheduler
is not implemented.Does it make sense?