Incompatibility with Rails 7.2+ permanent_connection_checkout = :disallowed
- Dominant language
- Ruby
- Stars
- 173
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
In Rails 7.2+, using `ActiveRecord::Base.connection` directly is no longer necessary, and Rails can be configured to produce either a deprecation warning or an error for this code pattern. The behavior can be toggled via `config.active_record.permanent_connection_checkout`. While the default setting (true) doesn't cause any issues, setting it to `:disallowed` produces errors when using this gem.
See:
https://guides.rubyonrails.org/configuring.html#config-active-record-permanent-connection-checkout
https://prateekcodes.com/rails-with-connection-better-database-connection-management/
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the gem's use of ActiveRecord::Base.connection, then reproduce the issue in Rails 7.2+ with config.active_record.permanent_connection_checkout set to :disallowed. Done means the gem's advisory-lock behavior works without the Rails connection-checkout error under that configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rails, ruby
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100