Rake tasks loading DB connection in Rails 7
In Rails 7, Rails tasks that previously did not require a DB connection now do.
Example failures:
- https://gitlab.com/gitlab-org/gitlab/-/jobs/3707505148
- https://gitlab.com/gitlab-org/gitlab/-/jobs/3707505176
Workaround is in 1fbc7b29, but we need to find a proper fix for this
Edited by Heinrich Lee Yu