Resolve incorrect connection usage raised in spec/tasks/gitlab/db_rake_spec.rb
The spec referred to in the name of this issue produces spec failures when executed against GitLab with a separate Sec database configured (so not a shared database or connection with main).
The GitLab CI suite does not currently execute tests in this fashion, so there is no way to certify that changes resolve the respective issue except to locally execute them with a separate Sec DB configured. However we will be able to to validate them over time by rerunning the pipeline on the MR where we are enabling the appropriate CI configuration here.
We need to resolve these piecemeal in order to make the CI configuration mergeable, as attempting to resolve all of these issues at once would result in a massive MR.
Edited by Gregory Havenga