Remove unnecessary allows between gitlab_schemas
What does this MR do and why?
gitlab_main_clusterwide
and gitlab_main_cell
will continue to be on the same database main
for each cell. We have re-allowed cross-joins and cross database modifications for tables for both of these gitlab_schemas. So all the exception allow-listing on tables are not necessary anymore.
This MR is part 3. To avoid changing so many tables within each MR.
- Part 1: !153294 (merged)
- Part 2: !154570 (merged)
Verify the new tests
- Edit
db/docs/organization_settings.yml
- Add these lines
allow_cross_joins:
- gitlab_main_clusterwide
allow_cross_transactions:
- gitlab_main_clusterwide
- The new tests that are added to
spec/lib/gitlab/database/gitlab_schema_spec.rb
should fail.
Script used to create this change
- Created a Ruby script called
modify.rb
(first name came to my mind)
require 'yaml'
content = YAML.load(File.read(ARGV[0]))
if content["allow_cross_joins"] || content["allow_cross_transactions"]
content.delete("allow_cross_joins")
content.delete("allow_cross_transactions")
f = File.open(ARGV[0], 'w')
f.write(YAML.dump(content, indentation: 0, line_width: 120))
f.close
end
cd db/docs
for f in *.yml; do ruby modify.rb $f; done
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.
Edited by Omar Qunsul