Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-02-21 12:35:45 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-02-21 12:35:45 +0300
commit5585b14c7e55de54fc49c05fef26cbf65221dedc (patch)
tree3f5d6f509c0d1d6bfa908145e6d4c5247b3174b2
parent40527b7eb669ca8c16c8f40427c42c6c47b0d076 (diff)
gitaly: Fix missing housekeeping manager dependency
While we set up the housekeeping manager when starting Gitaly, we don't inject it into the service dependencies. As a result, Gitaly will not have it set up during normal runtime operations and will thus trigger a panic whenever trying to access it. This went unnoticed because our test setup for the Gitaly server is different from the setup we use when running tests. Fix this bug by injecting the housekeeping manager as expected Changelog: fixed
-rw-r--r--cmd/gitaly/main.go27
1 files changed, 14 insertions, 13 deletions
diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go
index a3addda99..f0b525da2 100644
--- a/cmd/gitaly/main.go
+++ b/cmd/gitaly/main.go
@@ -254,19 +254,20 @@ func run(cfg config.Cfg) error {
}
setup.RegisterAll(srv, &service.Dependencies{
- Cfg: cfg,
- RubyServer: rubySrv,
- GitalyHookManager: hookManager,
- TransactionManager: transactionManager,
- StorageLocator: locator,
- ClientPool: conns,
- GitCmdFactory: gitCmdFactory,
- Linguist: ling,
- CatfileCache: catfileCache,
- DiskCache: diskCache,
- PackObjectsCache: streamCache,
- Git2goExecutor: git2goExecutor,
- UpdaterWithHooks: updaterWithHooks,
+ Cfg: cfg,
+ RubyServer: rubySrv,
+ GitalyHookManager: hookManager,
+ TransactionManager: transactionManager,
+ StorageLocator: locator,
+ ClientPool: conns,
+ GitCmdFactory: gitCmdFactory,
+ Linguist: ling,
+ CatfileCache: catfileCache,
+ DiskCache: diskCache,
+ PackObjectsCache: streamCache,
+ Git2goExecutor: git2goExecutor,
+ UpdaterWithHooks: updaterWithHooks,
+ HousekeepingManager: housekeepingManager,
})
b.RegisterStarter(starter.New(c, srv))
}