Sandbox Rails console is annoying
We added the --sandbox
flag to the Rails console commands (for sean-rails
, for example) in https://gitlab.com/gitlab-com/infrastructure/issues/3120.
This is annoying for a couple of reasons:
- It's impossible to test a migration that can't run inside a transaction. We should only test migrations on staging anyway, but staging also has this flag.
- It means that the user of the console needs to keep issuing DB queries to avoid hitting the transaction idle timeout, after which they need to quit and restart their console session from scratch to regain the ability to run DB queries. Given that this console is typically used for debugging production issues, where it needs some thought in between commands, this ticking-clock approach is pretty counterproductive.