Skip to content

gitaly_client: Support structured errors for `UserCreateBranch`

What does this MR do and why?

Gitaly is in the process to convert the UserCreateBranch RPC to use structured errors so that it can clearly indicate to a client what has gone wrong when an error is returned. This mechanism will replace the current one where errors are embedded into a successful response.

Part of: gitaly#4227 (closed)

Gitaly MR: gitaly!4835 (diffs)

Adapt the #user_create_branch wrapper to handle these structured errors.

Screenshots or screen recordings

Screenshot_2022-09-05_at_16-33-48_New_Branch___Flightjs___Flight___GitLab

How to set up and validate locally

  • Create a custom hook which throws exit 1
  • Enable the flag locally Feature.enable('gitaly_user_create_branch_structured_errors')
  • Try creating a new branch

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #4227 (closed)

Edited by Karthik Nayak

Merge request reports