Skip to content

Implement the status calculation for Approval Rules

What does this MR do and why?

This MR adds the business logic for Multi Access Levels in Deployment Approval.

  • If an environment has approval rules, the system consider the environment needs approvals. This makes the deployment jobs to be blocked status accordingly.
  • If a deployment job has satisfied all of the rules, the system unblocks the deployment job. Later, deployment executors can run the unblocked job.
  • Add ProtectedEnvironments::ApprovalSummary class to calculate the current rule statuses (e.g. how many rules, who approved which rule, which rule requires more approvals, etc). This later can be used for visualizing the summary in UI/API. See #355708 (closed) as the mental model.

A few notes:

  • Previous MRs are !83495 (merged) and !82800 (merged).
  • This feature is behind the feature flag deployment_approval_rules, which is disabled by default.
  • You can find more feature concept of Protected Environment in the documentation.

Screenshots or screen recordings

N/A (See the manual QA result of PoC)

How to set up and validate locally

N/A (See the manual QA result of PoC)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Shinya Maeda

Merge request reports

Loading