Decide if `environments/deployments` should be part of CI database
Currently after looking at CI PoC we see that depending on place where environments/deployments are the queries used are changing. Deployments are in particular often accessed with ci_builds
The are two possible designs:
-
Keep it on
main
:namespace/projects
is part ofmain DB
,environments/deployments
is part ofmain DB
,ci_builds
is part ofCI DB
-
Keep it on
CI
:namespace/projects
is part ofmain DB
,environments/deployments
is part ofCI DB
,ci_builds
is part ofCI DB
The place where environment/deployments
should be placed likely depends on planned features in a ~devops::release and expected outcome.
main
Keep it on In this model environments/deployments
is part of main DB
, and needs to cross-join DBs to fetch builds. This is what is currently implemented in PoC. This requires us to fix:
Ci::Pipeline#environments_in_self_and_descendants
- extensively
Environment
, especiallystop_actions
being most affected due to extensive usage of CTE
CI
Keep it on We did not validate the impact of this. We expect that at least Merge Request widget showing environments will be affected.