Skip to content

Volunteers to run gitlab.rails.databases.ci.enabled on GDK

We want to make decomposed databases the default state for local development (GDK) in #349589 (closed).

To help discover potential issues, groupsharding is looking for volunteers to test this out.

  1. Fill in your name, and role in the table below.
  2. Follow https://docs.gitlab.com/ee/development/database/multiple_databases.html#development-setup.
  3. Report back to this issue with your findings after a week.

We are looking for a diverse set of people who use GDK to volunteer for this:

Name Role
@ashmckenzie Staff Backend Engineer
@eread Senior Technical Writer
@dfrazao-gitlab Backend engineer, Database
@dcouture Staff Security Engineer
@pgascouvaillancourt Senior Frontend Engineer, Secure
@mlapierre Senior Software Engineer in Test
@marc_shaw Backend engineer, Dev Create
@alexkalderimis Backend Engineer (using GCK), Dev Ecosystem
@sunjungp Senior Product Designer, Geo Enablement
@alberts-gitlab Senior Backend Engineer, Verify, Pipeline Insights
@furkanayhan Senior Backend Engineer, Verify, Pipeline Authoring
@mbobin Senior Backend Engineer, Verify, Pipeline Execution
@aturinske Senior Frontend Engineer, Protect
@ekigbo Senior Frontend Engineer, Optimize
@splattael Staff Backend Engineer, Monitor
cell cell

Note: all engineers in @gitlab-org/sharding-group have been developing locally with decomposed databases for the last 6 months.

Reporting back your experience

When posting your report / question:

  1. Make sure to include the contents of your gdk.yml, and gitlab/config/database.yml files

FAQ / Troubleshooting

  1. What Slack channel is best to ask questions about this ?
    • Answer : The #g_sharding channel
  2. How do you switch back to single databases ?
  3. What are the differences in multiple databases ?
    • Answer: It's based on Rail's multiple database support. Most things will be the same.
    • Certain commands like bundle exec rails db:migrate:down will need to be run like this now:
      • bundle exec rails db:migrate:down:main
      • bundle exec rails db:migrate:down:ci
    • Read https://guides.rubyonrails.org/active_record_multiple_databases.html for reference
  4. What is the plan ?
    • Answer: Assuming this test goes well, we plan to update GDK to:
      1. !82090 (merged) Enable multiple databases on CI
      2. gitlab-development-kit!2464 (merged) use multiple database connections, but same underlying database (gitlab.rails.databases.ci.enabled to true, gitlab.rails.databases.ci.use_main_database to true). Target date: 2022-03-23
      3. use multiple database connections, with distinct underlying databases (gitlab.rails.databases.ci.enabled to true, gitlab.rails.databases.ci.use_main_database to false). Target date: 2022-04-10

Follow-up

Edited by Thong Kuah