Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 196
    • Issues 196
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapodheptapod
  • heptapodheptapod
  • Issues
  • #509
Closed
Open
Issue created Jul 05, 2021 by Georges Racinet@gracinet🦑Owner

Switch post-receive API calls to JSON for Mercurial projects

Because GitLab's internal API relies on request parsing provided by Grape and/or Rack, the post_receive internal API endpoint accepts both multipart/form-data and application/json. For Mercurial repositories, we've always used the former, but GitLab components that send post-receives actually use the latter.

This is problematic for nested structures, such as lists (e.g. push_options) where only the last element is actually visible after parsing. In the case of hg_prunes, we've settled for JSON serialization of the value from the onset, which didn't create more divergence with upstream, since it's specific.

It would be much better to switch to JSON for the whole payload. This requires careful treatment of the bytes vs str pain on the Python side.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking