Skip to content

Merge requests no longer support merging with a large commit message #1452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jaserieger opened this issue May 13, 2021 · 3 comments
Closed

Comments

@jaserieger
Copy link

jaserieger commented May 13, 2021

Description of the problem, including code/CLI snippet

After upgrading to python-gitlab 2.7.1 from 2.1.2 merge requests no longer consistently merge.

Having a large (more than 1000 character) merge commit message returns a 414 request too large, due to putting the commit message in query string.

mergeRequest.merge(merge_commit_message=closureNote, should_remove_source_branch=True)

The behaviour change occurred in python-gitlab 2.4.0:
878098b
#1121

Expected Behavior

Merge request should merge to the target branch with the (large) merge commit message and remove the existing source branch

Actual Behavior

gitlab.exceptions.GitlabMRClosedError exception occurs with 414 request-URI too large error

Specifications

  • python-gitlab version: 2.7.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): internal gitlab version 13.11.2-ee
@JohnVillalovos
Copy link
Member

From the docs it does appear that typically it should be sent in a payload body https://docs.gitlab.com/ee/api/README.html#request-payload

So likely the previous patch should be reverted but we should test that what the patch was fixing doesn't get broken.

@nejch
Copy link
Member

nejch commented May 13, 2021

I was also doubting whether sending query data in POST requests really made sense when reading the original issue #1120 (comment) 🤔

So we should test that @ferhat-aram's case (from the original issue) still works. But I suspect that has something to do with custom reverse proxies rather than GitLab itself.

BTW out of curiosity where did you get python-gitlab 2.9.0? 😁

@jaserieger
Copy link
Author

should have been python-gitlab 2.7.1. I should have double checked (conflated 1.9.0 from docs and 2.7.1 from github). I have updated the original issue to be correct

@nejch nejch closed this as completed in cb6a3c6 May 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants