Research Spike: Wait for MR approval in CI pipeline jobs
add a new kind of syntax for a job that will require the MR introducing the change to have been approved, and wait if that has not yet been completed. This has a few benefits:
This would be implemented for a job via the
when:keyword, by adding an
approvedvalue; typically this would be paired with the
masterpipeline jobs that actually do the deployment. When set, the job will wait for the approval on the MR before continuing. If the MR is already approved (which could optionally be enforced with the existing optional requirement for # of MR approvals), it considers itself to have already collected the required approvals and continues on.
Questions to be answered
- What code changes would be necessary to implement this change? (Responsibility: backend frontend)
- What potential conflicts exist with other configuration options (i.e.
allow_failure)? (Responsibility: backend)
- How does this integrate with the existing merge request approval rules? (Responsibility: ~PM UX)
- Should it be different and separate from the MR approval process (do I approve the MR then the pipeline to run or or vice versa)?
- Should it use the same approvers but have different approval thresholds?
- What's a real-world scenario for this? What kind of jobs run on MRs that would need approval to run? Deployments to review apps or similar?
- Where should we display the list of approvals for a blocked job? The pipeline widget in an MR? The MR sidebar? Somewhere in both the pipeline and job views?
- A working prototype that adds support for the
- Answers to the open questions above
- Any new questions generated during the research
- A recommended execution plan for future releases
This research spike should be roughly limited to one week