Skip to content

Add structured error parsing for user_cherry_pick

John Cai requested to merge jc-structured-errors-for-cherry-pick into master

Gitaly's UserCherryPick RPC will begin to return structured errors. The reason is that currently we return an error message embedded in the response and hence it looks like the RPC succeeded. This not only hides errors in the metrics and logs, Praefect will also expect transaction voting to happen correctly for successful requests. However, an error happened which sometimes causes voting to not happen at all. In this situation, Praefect will schedule unneeded replication jobs.

This change prepares for the Gitaly change by putting in place code that parses the structured error and raises the same errors as it did when parsing the response for the analagous errors.

part of: gitaly#4111 (closed)

similar to: !82626 (merged)

Changelog: changed

Edited by John Cai

Merge request reports