diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-09 10:34:43 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-09 13:23:23 +0300 |
commit | 25cdc4d438995c62e060cdea064319c6526c6a23 (patch) | |
tree | b83f5c6136fda38068544b2cfd2fc496d4f04900 /internal/praefect | |
parent | 8be19842eef0c0186f9294f86f86d78e7f1b2e71 (diff) |
gitaly: Refactor server setup to take a hook manager
The Gitaly server setup requires to pass a `hook.GitlabAPI` object which
is in turn used to instantiate the `hook.Manager`. This commit refactors
the setup to instead take a manager directly which allows us to inject
the manager from the top-level command similar like we do in Praefect.
One benefit is that we can thus move setup of metrics into the manager
itself and then register those in `cmd/gitaly`.
Note that this commit removes the voting delay metric altogether without
replacement. This is only done to not do too many things at the same
time, but it'll resurface in the commit immediately following this one.
Diffstat (limited to 'internal/praefect')
-rw-r--r-- | internal/praefect/replicator_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/praefect/replicator_test.go b/internal/praefect/replicator_test.go index f0a2f8244..cb98654f1 100644 --- a/internal/praefect/replicator_test.go +++ b/internal/praefect/replicator_test.go @@ -904,7 +904,7 @@ func TestBackoff(t *testing.T) { } func runFullGitalyServer(t *testing.T) (*grpc.Server, string) { - server := serverPkg.NewInsecure(RubyServer, hook.GitlabAPIStub, gitaly_config.Config) + server := serverPkg.NewInsecure(RubyServer, hook.NewManager(hook.GitlabAPIStub, gitaly_config.Config), gitaly_config.Config) serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() |