Fix Ci::Runner#projects and Ci::Runner#groups doing cross-joins
Extracted from #336423 (closed) .
We have identified these has_many through:
relations cross-join between ci_*
and non ci_*
tables which will not be allowed once ci_*
tables are moved to a new database.
This includes the assign_builds_and_projects
method in app/controllers/admin/runners_controller.rb
Possible solutions
Ideally, we remove the relationships entirely. This will be possible once !72033 (closed) has been merged and we can replace the uses of these relationships with the new hierarchy tables