GDK 2nd Cell cannot seeding create groups
When running rake db:seed_fu
from 2nd GDK cell, the 03_project.rb
fails even when trying to create the groups with a different route path that doesn't conflict with the groups on the 1st GDK cell.
Steps to reproduce the problem:
- Make sure you have first GDK up and running, and you ran
rake db:seed_fu
on it. - Create another GDK cell using the steps here: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/cells.md
- Make sure also you ran
rake gitlab:db:cells:bump_cell_sequences\[10000\]
as part of (2). It can be easily overlooked because things won't break until you create data (I did that!). - In the 2nd GDK
db/fixtures/development/03_project.rb
remove the linereturn unless Gitlab::Seeder.primary_cell?
in thein_context(:cell)
block. - Run
rake db:seed_fu
. You should getcurrent transaction is aborted, commands ignored
error
Fix project routes seeding
In this seeds file https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/fixtures/development/03_project_4_routes.rb we do cross joins between projects
and routes
. But these two tables should belong to different databases later main_cell
and main_clusterwide
. As part of this issue, we should fix this. We should read the paths from projects, and insert them to routes via another query.
Edited by Omar Qunsul