Skip to content

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 of main DB, environments/deployments is part of main DB, ci_builds is part of CI DB
  • Keep it on CI: namespace/projects is part of main DB, environments/deployments is part of CI DB, ci_builds is part of CI DB

The place where environment/deployments should be placed likely depends on planned features in a ~devops::release and expected outcome.

Keep it on main

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, especially stop_actions being most affected due to extensive usage of CTE

Keep it on CI

We did not validate the impact of this. We expect that at least Merge Request widget showing environments will be affected.