Updating Merge Request approvals in project doesn't update open MRs with updated approval rules
Summary
Hello hello gitlab friends!
We recently added a couple owners to a repo we had, and we noticed a bunch of our old MRs still had a outdated set of CODEOWNER approvals on them:
We notice if we make a new commit in the MR it gets updated with the right owners:
I think we expect to see if we update something that affects approvals for the MR that it automatically get reflected in all open MRs in the repo without having to poke each MR individually with a commit?
Taking a step back, I think there's a more generalized problem... I created an almost blank repo with a readme started tinkering with "Merge Request Approvals":
If we create an MR when only two of the rules were defined (OG Developers / NEW RULES) then in our MR we see only two approvals required:
If we go in later and add another rule, on the MR it doesn't say 3 approvals needed (OG Developers / NEW RULES / NEW NEW RULES). Only the two original approvals are required (OG Developers / NEW RULES)
If I later go and create a new MR from the same branch, I get the right three approvals:
I tried a bunch of things to get the third approval to come up on the MR that only had two approvals. I tried adding commits to the branch, I tried commenting, I tried closing and reopening the MR, none of it seemed to work. Any ideas?
Thank you so much in advance!
Steps to reproduce
- Have some Merge Request approval rules set up in repo
- Create new MR for repo
- See that approval rules are correct for MR
- Update merge request approval rules (add rule, subtract rule, change name of rule that can approve, etc)
- See that the approval rules are the original approval rules and haven't been updated
Example Project
Don't have a good public facing reproducible repo, but I can whip one up really fast if this isn't easy to reproduce on Gitlab's side. We are running GitLab Enterprise Edition 17.0.0-pre f78429a3
What is the current bug behavior?
It looks like MR approval rules don't get updated when folks in different approval rules shift around. It also looks like things don't get updated if the approval rules themselves get modified.
What is the expected correct behavior?
I'd expect to be able to see updated Gitlab approval rules for the MRs that reflect current membership in different rules! I'd also expect if the repo changes it's approval rules that affected MRs would have their approval rules updated! Finally, if Gitlab doesn't automatically update these approvals for us, I'd expect we have a manual way to force a re-evaluation of the rules!
Relevant logs and/or screenshots
Screenshots above!
Results of GitLab environment info
GitLab Enterprise Edition 17.0.0-pre f78429a3