Migrate Git Hooks to an RPC call
Gitaly has absorbed the git hooks from GitLab Shell and now fully manages all the Git Hooks. For performance improvements we should port these to Go: #1594 (closed). This could also improve the observibility of it 'for free' if each hook will be a new RPC.
The idea is to have a very small Go binary that has the same name as all the hooks have now, in a new global hook dir. This hook connects to Gitaly on the same machine and calls the RPC of their own name. Gitaly that handles this RPC by calling the old Ruby logic.
The proposed flow:
sequenceDiagram
participant GoBinGitHook
participant Gitaly
participant RubyGitHook
GoBinGitHook->Gitaly: HookService.SomeHook()?
Gitaly->RubyGitHook: Ruby please execute some_hook
RubyGitHook->Gitaly: <some result>
Gitaly->GoBinGitHook: <some result>
Edited by Zeger-Jan van de Weg