Skip to content

Fix deployment blocked after update protected environment approval rule

What does this MR do and why?

This MR fix the bug about protected environments. You can see detail here.

Closes Protected environment: changing the approval re... (#385941 - closed) Related to issue #404574 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Create a protected environment production.
  2. Add production protected environments, and add an approval rule with required_approvals is 2.
  3. Push new commit to the project.
  4. The deploy job will be blocked. (This is as expected)
  5. Update the approval rule of protected environment production, set required_approvals to 0.
  6. The deploy job still be blocked. (This is not as expected! No new approvals are needed at this point, so it should not be blocked)

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 Zehua Zhang

Merge request reports