Skip to content

Strong validate used config names in `database.yml` and normalize legacy config

What does this MR do?

References:

This achieves a few goals:

  • ensures that only main, ci can be used
  • ensures that no replica: true is used
  • ensures that legacy config is properly transformed to use main: (normalized)
  • ensures that main: is a first entry in a list

I did not find any other method than this. The Rails does not make it easy to define a default name being used, like primary.

This is supposed to be short-living change, and the one that we will not be affected when running on production: since we already migrated to main:.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Kamil Trzciński (Back 2025-01-01)

Merge request reports

Loading