Track manual deployments
Problem
Today, we don't have an efficient way to fetch manual deployments that waiting for executors to play the job. We can filter deployments by status (e.g. deployment.status == 'created'
), however, it includes both pending
(will-run-without-manual-intervention) and manual
jobs. We can check the deployment.deployable.status == 'manual'
to check if the deployment is manual
, however, this is not a scalable approach because we can't cross-join the deployments
and ci_builds
table after the DB decomposition.
Proposal
Mark manual deployments as blocked
(internal) / "waiting"(UI) status. This status represents that the entry requires manual interaction, such as deployment approvals.
previous proposal
We copy the attribute of ci_builds.when
, which indicates manual
or scheduled
job, to deployments.ci_build_when
. This is one of the techniques documented in As per the De-normalize some foreign key to the table..
Here is a PoC MR