Skip to content

Let gitaly-hook propagate limit error back to clients

gitaly-hook is a wrapper for several git hooks. It issues several RPCs back to Gitaly via internal channels. When a RPC fails, it usually terminates the in-flight connections. This ungraceful termination leads to unexpected, sometimes misleading, messages in clients.

This commit lays a foundation for handling such error in a more intentional way. Let's start with limiterhandler.LimitError.

Please note. The repository corruption message is hard-coded, it's not easy to make it go away at this point. It will be handled in Reword error message when git fails to create p... (#5086 - moved).

Before

  • Console output:

Screenshot_2023-04-27_at_14.23.18

  • gitaly_hooks.log

Screenshot_2023-04-27_at_14.23.34

After

  • Console output:

Screenshot_2023-04-25_at_21.25.14

  • gitaly_hooks.log

Screenshot_2023-04-27_at_14.00.47

Edited by Quang-Minh Nguyen

Merge request reports