jx icon indicating copy to clipboard operation
jx copied to clipboard

Error merging MR in GitLab - failed merging [55]: [Method Not Allowed]

Open chrislovecnm opened this issue 3 years ago • 1 comments

We have encountered as error where Jenkins-X keeps adding a comment to an MR in GitLab - failed merging [55]: [Method Not Allowed]

The problem we ran into is most likely caused by a merge rule that forces approval of the MR in GitLab itself. See here https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html#add-an-approval-rule

Disabling the merge rule fixed part of the problem. An existing MR would not merge, but re-openning the MR would fix the problem.

Another issue with it is that a comment is repeatedly added. We are seeing logs in the lighthouse webhooks pod over and over again. So you end up with hundreds of the same comment on an MR.

An MR in GitLab is the same as a PR in GitHub.

chrislovecnm avatar Jul 13 '22 17:07 chrislovecnm

The problem we ran into is most likely caused by a merge rule that forces approval of the MR in GitLab itself

I believe this happens not only in gitlab, but also in github if branch protection rules specify one github approval. I think for now, documenting this in jx-docs as a known issue, and asking users to disable this is a start.

ankitm123 avatar Jul 14 '22 00:07 ankitm123