Closed grxy closed 3 years ago
this happens because of line 71 in manages_transactions.rb
. you can fake it out by modifying ActiveRecord's activerecord/lib/active_record/test_fixtures.rb
like this:
at the risk of stating the obvious, I do not actually think you should do this in production! but it's a good way to validate my diagnosis.
the ManagesTransactions class has a method called gather_connections
. this calls a method called setup_shared_connection_pool
, which leads to the code in test_fixtures.rb
in ActiveRecord exploding.
commenting out line 71 in manages_transactions.rb
also works.
Hey Giles, sorry I hadn't had a chance to look at this previously. I'm unsure if the right option is to add a new option or just do a little more checking about either version or connection pool configuration before making this call. I'll try to look at it this week.
@searls all good, no rush
Hey @gilesbowkett & @grxy -- I am somewhat confident that this particular error was just fixed in 0.5.1, but I am not confident at all that the underlying intention was ever working correctly. As a result, I'd love if you could try this out and see if you encounter any issues
Circle is down right now but it works fine on my machine.
I actually thought I didn't have a connection pool in the app where this came up, but after checking my config/database.yml
, it looks like I do. so there's a bit of a 🤷🏻♂️ factor, but it's working.
@gilesbowkett yeah, if you read the AR code, the only way to trigger the error you and @grxy experienced was if you did have a pool in use.
Also I just switched from Circle to GitHub Actions today while debugging this
yeah, if you read the AR code, the only way to trigger the error you and @grxy experienced was if you did have a pool in use.
who reads code though
heh, we're on the same page
I learned a long time ago nobody reads code, much less verifies it. The last thing people need is more inhibition / shame.
Here are the logs I get when running
bin/rails cypress:open
on my computer andbin/rails cypress:run
in CI:Seems like there were some recent changes to the way
setup_shared_connection_pool
works that causecypress-rails
to be totally unusable with this particular version of rails.CC: @dflynn15