flexport / quarantine

Quarantine flaky Ruby Rspec tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use with ruby 2.3 or 2.4

sourabhkt opened this issue · comments

First of all, Thanks for this awesome gem.

I tried using this with ruby 2.3 & 2.4 versions as it mentions supporting ruby > 2.3.0 but couldn't make this work.

When running the tests, I get this -

➜  repo git:(feature/auto-quarantine-tests) ✗ CI=true rspec spec/features/test_demo_spec.rb
NoMethodError:
  undefined method `match?' for :id:Symbol
  Did you mean?  match
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/decorator.rb:242:in `validate_prop_name'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `validate_call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:234:in `block in _on_method_added'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/decorator.rb:209:in `prop_validate_definition!'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:238:in `call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:238:in `block in _on_method_added'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/optional.rb:65:in `prop_validate_definition!'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/serializable.rb:262:in `prop_validate_definition!'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/decorator.rb:303:in `prop_defined'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:238:in `call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:238:in `block in _on_method_added'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/_props.rb:106:in `prop'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `validate_call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:234:in `block in _on_method_added'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/props/_props.rb:137:in `const'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/call_validation.rb:165:in `validate_call'
# ./vendor/bundle/ruby/2.3.0/gems/sorbet-runtime-0.5.6338/lib/types/private/methods/_methods.rb:234:in `block in _on_method_added'
# ./vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/test.rb:7:in `<class:Test>'
# ./vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/test.rb:4:in `<class:Quarantine>'
# ./vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/test.rb:3:in `<top (required)>'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-3.2.22.23/lib/active_support/dependencies.rb:251:in `require'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-3.2.22.23/lib/active_support/dependencies.rb:251:in `block in require'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-3.2.22.23/lib/active_support/dependencies.rb:236:in `load_dependency'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-3.2.22.23/lib/active_support/dependencies.rb:251:in `require'
# ./vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine.rb:7:in `<top (required)>'
# ./config/application.rb:13:in `<top (required)>'
# ./config/environment.rb:2:in `require'
# ./config/environment.rb:2:in `<top (required)>'
# ./spec/spec_helper.rb:9:in `require'
# ./spec/spec_helper.rb:9:in `<top (required)>'
# ./spec/features/test_demo_spec.rb:1:in `require'
# ./spec/features/test_demo_spec.rb:1:in `<top (required)>'

Also when trying to create the databases, I get this -

➜  repo git:(feature/auto-quarantine-tests) ✗ bundle exec quarantine_dynamodb -h
/Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/databases/base.rb:6:in `<class:Base>': uninitialized constant Quarantine::Databases::Base::T (NameError)
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/databases/base.rb:5:in `<module:Databases>'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/databases/base.rb:4:in `<class:Quarantine>'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/databases/base.rb:3:in `<top (required)>'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/cli.rb:4:in `require_relative'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/lib/quarantine/cli.rb:4:in `<top (required)>'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/bin/quarantine_dynamodb:5:in `require_relative'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/gems/quarantine-2.2.0/bin/quarantine_dynamodb:5:in `<top (required)>'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/bin/quarantine_dynamodb:23:in `load'
	from /Users/sourabh/iubenda/mater/vendor/bundle/ruby/2.3.0/bin/quarantine_dynamodb:23:in `<main>'
	from /Users/sourabh/.rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:24:in `eval'
	from /Users/sourabh/.rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:24:in `<main>'

@alekstorm do we have a way to get this work with ruby 2.3 or 2.4? Thanks ❤️