Geo - Use Rails 6 many databases support
What does this MR do and why?
Currently, Geo manually manages additional DB connections. This results in a number of overwrites to provide this kind of support.
This MR was extracted from !70749 (closed) and is the first step towards configuring the Geo tracking database in database.yml
with the following:
- Use Rails 6 many databases support to reduce the complexity of the current implementation;
- Keep Geo tracking database files (
structure.sql
, migrations, etc) in EE;
The next steps are:
- Use
connects_to
to make Geo models use the tracking database instead ofdef self.connection
override inGeo::TrackingBase
- Deprecate custom
rake geo:db:*
rake tasks in favor of built-in tasksrake db:*:geo
; - Configure the Geo tracking database in the
database.yml
instead of customdatabase_geo.yml
and deprecate it for removal in GitLab 15.0.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #340083 (closed)
Edited by Douglas Barbosa Alexandre