Make CI API to always use primary DB
What does this MR do?
We hit the problem described in this issue: https://gitlab.com/gitlab-com/infrastructure/issues/1441
This MR makes the CI API to always use primary, because of reasons outlined in the issues.
Secondly, this needs to happen for all requests, because if we connect the second replica that doesn't have yet data and we return 404 runner will think that build is not existing which is not fully true and it will abort job, but do not send the status back as it will assume that this is forbidden.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together