Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 157
    • Issues 157
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • heptapodheptapod
  • Issues
  • #509

Closed
Open
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