Skip to content

Geo: Handle main attribute in database_geo.yml

What does this MR do?

Resolves #337385 (closed) so we can rerevert omnibus-gitlab!5507 (merged) and unblock the sharding effort as soon as possible.

This has already been manually validated to work with the "main" attribute in geo.staging.gitlab.com #337361 (comment 640387890), as well as in my GDK.

How to setup and validate locally (strongly suggested)

  1. In a Geo secondary site
  2. Open the config/database_geo.yml file
  3. Insert an intermediate main: attribute between the Rails environment (production:, development:, etc) and the connection info. See !65243 (diffs) as an example
  4. Restart Rails processes
  5. The Rails processes should be able to connect to the Geo tracking database as usual
  6. Note that this initializer code is also compatible with the old style of database_geo.yml as well. You can test that by removing the main: attribute.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Merge request reports