Fix deployment blocked after update protected environment approval rule
requested to merge gitlab-jh/jh-team/gitlab:fix-deployment-blocked-after-update-protected-environment-approval-rule into master
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.
- Create a protected environment production.
- Add production protected environments, and add an approval rule with required_approvals is 2.
- Push new commit to the project.
- The deploy job will be blocked. (This is as expected)
- Update the approval rule of protected environment production, set required_approvals to 0.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zehua Zhang