Skip to content

Draft: Allowlist for gitlab_schema in db/docs per table

Dylan Griffith requested to merge allowlist-gitlab-schema-in-db-docs into master

What does this MR do and why?

There are 2 parts to this change:

  1. Move a bunch of unnecessary logic out of GitlabSchema and into the Database::Dictionary. Also it moves tests to the Database::Dictionary that should have been there in the first place. This is to make the next change easier to implement.
  2. Add support for configuring allow_cross_joins, allow_cross_transactions and allow_cross_foreign_keys per table in their retrospective db/docs file. This should behave equivalently to configuring the same named keys in db/gitlab_schemas where specific_tables are given. See the example configuration structure at https://gitlab.com/gitlab-org/gitlab/-/blob/f450278eb443284614e73b481c4a57476e7c0967/db/gitlab_schemas/gitlab_main_clusterwide.yaml#L17

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request reports