Merge request approvals api does not affect merge request
Summary
When changing the number of approvals_required GitLab does not register these changes for the specific MR.
Steps to reproduce
- Create a project and enable the setting
Can override approvers and approvals required per merge request - Set required approval count to
1 - Create a Merge request
- Change the number of required approvals via api (
POST /projects/:id/merge_requests/:merge_request_iid/approvals) to2
What is the current bug behavior?
You are able to merge the request with only one approval.
What is the expected correct behavior?
You should need at least two approvals to merge the request.
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.0.3-ee Revision: 1b1872f9d93 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.11 URL: https://scm..net HTTP Clone URL: https://scm..net/some-group/some-project.git SSH Clone URL: git@scm.***.net:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: bitbucket
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/5 ... yes 2/6 ... yes 5/7 ... yes 16/8 ... yes 19/9 ... yes 19/10 ... yes 20/11 ... yes 15/18 ... yes 15/19 ... yes 16/21 ... yes 7/22 ... yes 7/23 ... yes 7/24 ... yes 7/25 ... yes 7/26 ... yes 7/27 ... yes 7/28 ... yes 7/29 ... yes 7/30 ... yes 8/32 ... yes 25/33 ... yes 9/34 ... yes 14/35 ... yes 10/37 ... yes 30/38 ... yes 8/40 ... yes 8/41 ... yes 8/42 ... yes 5/44 ... yes 3/46 ... yes 16/48 ... yes 15/49 ... yes 32/50 ... yes 4/52 ... yes 4/53 ... yes 10/55 ... yes 33/56 ... yes 34/57 ... yes 34/58 ... yes 12/60 ... yes 12/61 ... yes 14/62 ... yes 35/63 ... yes 3/64 ... yes 9/65 ... yes 9/66 ... yes 9/67 ... yes 5/69 ... yes 15/71 ... yes 10/72 ... yes 30/73 ... yes 9/74 ... yes 9/75 ... yes 33/77 ... yes 9/78 ... yes 38/80 ... yes 22/81 ... yes 9/84 ... yes 39/88 ... yes 15/91 ... yes 27/92 ... yes 26/93 ... yes 40/94 ... yes 9/95 ... yes 9/96 ... yes 41/98 ... yes 41/100 ... yes 15/104 ... yes 12/106 ... yes 12/107 ... yes 2/108 ... yes 9/111 ... yes 2/112 ... yes 20/113 ... yes 21/114 ... yes 20/115 ... yes 3/116 ... yes 3/121 ... yes 9/124 ... yes 9/125 ... yes 9/126 ... yes 9/127 ... yes 9/128 ... yes 2/129 ... yes 8/131 ... yes 8/135 ... yes 9/136 ... yes 37/139 ... yes 9/140 ... yes 9/141 ... yes 9/142 ... yes 12/143 ... yes 43/144 ... yes 7/145 ... yes 45/146 ... yes 45/148 ... yes 27/149 ... yes 14/151 ... yes 9/152 ... yes 44/153 ... yes 46/159 ... yes 9/161 ... yes 30/164 ... yes 12/165 ... yes 48/167 ... yes 48/168 ... yes 44/169 ... yes 44/170 ... yes 44/171 ... yes 44/172 ... yes 3/173 ... yes 30/174 ... yes 30/175 ... yes 49/176 ... yes 20/177 ... yes 2/182 ... yes 24/183 ... yes 46/184 ... yes 9/185 ... yes 9/186 ... yes 50/187 ... yes 50/188 ... yes 50/189 ... yes 50/190 ... yes 50/191 ... yes 50/192 ... yes 15/193 ... yes 12/194 ... yes 50/196 ... yes 43/197 ... yes 51/198 ... yes 51/199 ... yes 51/200 ... yes 51/201 ... yes 51/202 ... yes 51/203 ... yes 51/204 ... yes 51/205 ... yes 51/206 ... yes 51/207 ... yes 51/208 ... yes 51/209 ... yes 51/210 ... yes 51/211 ... yes 51/212 ... yes 51/213 ... yes 51/214 ... yes 51/215 ... yes 51/216 ... yes 51/217 ... yes 51/218 ... yes 51/219 ... yes 51/220 ... yes 51/221 ... yes 51/222 ... yes 51/223 ... yes 51/224 ... yes 51/225 ... yes 51/226 ... yes 51/227 ... yes 51/228 ... yes 51/229 ... yes 51/230 ... yes 51/231 ... yes 51/232 ... yes 51/233 ... yes 51/234 ... yes 51/235 ... yes 51/236 ... yes 51/237 ... yes 14/238 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 17 Elasticsearch version 5.6 - 6.x? ... yes (6.4.2)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Could be related to https://gitlab.com/gitlab-org/gitlab-ce/issues/61238