Skip to content

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

Closed

Description

@jaserieger

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

Activity

  1. JohnVillalovos commented on May 13, 2021

    @JohnVillalovos
    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.

  2. nejch commented on May 13, 2021

    @nejch
    Member

    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? 😁

  3. jaserieger commented on May 13, 2021

    @jaserieger
    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

  4. locked as resolved and limited conversation to collaborators on May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions