The Wire · Showcase
SOLID_QUEUE FIXES RAILS 8.1 CONNECTION CHECKOUT CLASH
By RepoJournal · Filed · About Rails
Solid Queue patched a critical incompatibility with Rails 8.1's permanent connection checkout mode that breaks the new DistinctValues module.
The issue surfaces when `config.active_record.permanent_connection_checkout = :disallowed` is set: bare calls to `connection` resolve to the deprecated ActiveRecord::Base.connection and raise errors [1]. Solid Queue's DistinctValues module, introduced recently, made those direct calls and broke under the stricter Rails 8.1 configuration [2]. The fix wraps connection access in `connection_pool.with_connection`, following the established pattern from prior work [1]. In parallel, Solid Queue gained `--only-recurring` to explicitly run just the recurring scheduler in isolation [3], replacing the empty workers/dispatchers workaround and mirroring the existing `--skip-recurring` option. Rails core cleaned up a Markdown doc check that clashed with Rubocop's formatting rules on frozen string literals [4], resolving a conflict between what the linter wanted and what the doc validator would accept [5].
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Update Solid Queue to the latest patch if you use permanent_connection_checkout = :disallowed on Rails 8.1 rails/solid_queue [immediate]
- → Review if --only-recurring simplifies your scheduler deployment model rails/solid_queue [plan]
References
- [1] Lease connections in DistinctValues instead of calling deprecated `connection` rails/solid_queue
- [2] Use with_connection in DistinctValues ↗ rails/solid_queue
- [3] Add --only-recurring to run just the recurring scheduler ↗ rails/solid_queue
- [4] Fix Markdown doc check rails/rails
- [5] Fix Markdown doc check ↗ rails/rails