basecamp / basecamp/console1984
Sandbox mode won't work with rails 7.2
- Dominant language
- Ruby
- Stars
- 844
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
I recently upgraded our app (console1984 installed) to rails 7.2 and realized that the sandbox mode did not work. It worked fine when rails 7.1.
The problem seems like calling `reconnect!` without `restore_transactions: true`. I added the option and sandbox mode worked again. Furthermore, the sandbox mode breaks if I call `ApplicationRecord.connection.reconnect!` in a working sandboxed rails console.
https://github.com/basecamp/console1984/blob/f7b85df5866c16ff9ba0c4e3e994cb0d9e0106ab/lib/console1984/sessions_logger/database.rb#L64
See also https://github.com/basecamp/console1984/issues/91.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/console1984/sessions_logger/database.rb at the linked line and inspect how reconnect! is called during sandbox sessions. Reproduce the Rails 7.2 sandbox failure, including ApplicationRecord.connection.reconnect!, and verify that sandbox mode continues to work in both cases with transaction state restored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100