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:
authorSami Hiltunen <shiltunen@gitlab.com>2022-02-08 16:09:50 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2022-02-09 21:11:35 +0300
commit0e0be19ae72bb724afa9c1d78b7b02726b496464 (patch)
tree893dbf48a7a250d4239a9630e2b0aad69fd3bc29
parentd9e05a74f672aa10f5e3449d4bae433995974471 (diff)
Remove metadata creation hack from Praefect
Praefect contains a testing hack that created metadata for repositories when Praefect first received a request for them. This allowed Praefect to be used in Gitaly tests that placed repositories directly in the storage rather than creating them through the API. Placing the repositories directly in the storage didn't allow for Praefect to create the required metadata entries on repository creation which in turn caused failures in the tests as Praefect would return a not found. All of the said tests have been changed to create the repositories through the API, so the hack is no longer needed. This commit removes the hack from Praefect and the associated configuration options.
-rw-r--r--cmd/gitaly-backup/create_test.go2
-rw-r--r--internal/backup/backup_test.go6
-rw-r--r--internal/git/localrepo/remote_extra_test.go2
-rw-r--r--internal/git/remoterepo/repository_test.go2
-rw-r--r--internal/gitaly/service/blob/testhelper_test.go2
-rw-r--r--internal/gitaly/service/cleanup/testhelper_test.go2
-rw-r--r--internal/gitaly/service/commit/testhelper_test.go2
-rw-r--r--internal/gitaly/service/conflicts/testhelper_test.go2
-rw-r--r--internal/gitaly/service/diff/testhelper_test.go2
-rw-r--r--internal/gitaly/service/objectpool/testhelper_test.go2
-rw-r--r--internal/gitaly/service/operations/testhelper_test.go2
-rw-r--r--internal/gitaly/service/ref/delete_refs_test.go2
-rw-r--r--internal/gitaly/service/ref/testhelper_test.go2
-rw-r--r--internal/gitaly/service/remote/testhelper_test.go2
-rw-r--r--internal/gitaly/service/repository/testhelper_test.go2
-rw-r--r--internal/gitaly/service/smarthttp/testhelper_test.go2
-rw-r--r--internal/gitaly/service/ssh/testhelper_test.go1
-rw-r--r--internal/gitaly/service/wiki/testhelper_test.go2
-rw-r--r--internal/praefect/config/config.go4
-rw-r--r--internal/praefect/coordinator.go41
-rw-r--r--internal/testhelper/testserver/gitaly.go55
21 files changed, 34 insertions, 105 deletions
diff --git a/cmd/gitaly-backup/create_test.go b/cmd/gitaly-backup/create_test.go
index 5e602f8bd..2d1613dc9 100644
--- a/cmd/gitaly-backup/create_test.go
+++ b/cmd/gitaly-backup/create_test.go
@@ -21,7 +21,7 @@ import (
func TestCreateSubcommand(t *testing.T) {
cfg := testcfg.Build(t)
- cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll, testserver.WithDisableMetadataForceCreation())
+ cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll)
ctx := testhelper.Context(t)
path := testhelper.TempDir(t)
diff --git a/internal/backup/backup_test.go b/internal/backup/backup_test.go
index ee9c44ee6..1486aa211 100644
--- a/internal/backup/backup_test.go
+++ b/internal/backup/backup_test.go
@@ -31,7 +31,7 @@ func TestManager_Create(t *testing.T) {
cfg := testcfg.Build(t)
- cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll, testserver.WithDisableMetadataForceCreation())
+ cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll)
ctx := testhelper.Context(t)
@@ -155,7 +155,7 @@ func TestManager_Create_incremental(t *testing.T) {
cfg := testcfg.Build(t)
- cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll, testserver.WithDisableMetadataForceCreation())
+ cfg.SocketPath = testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll)
ctx := testhelper.Context(t)
for _, tc := range []struct {
@@ -274,7 +274,7 @@ func TestManager_Restore(t *testing.T) {
cfg := testcfg.Build(t)
testcfg.BuildGitalyHooks(t, cfg)
- gitalyAddr := testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll, testserver.WithDisableMetadataForceCreation())
+ gitalyAddr := testserver.RunGitalyServer(t, cfg, nil, setup.RegisterAll)
ctx := testhelper.Context(t)
testManagerRestore(t, ctx, cfg, gitalyAddr)
diff --git a/internal/git/localrepo/remote_extra_test.go b/internal/git/localrepo/remote_extra_test.go
index 4157fc491..6f751bfb9 100644
--- a/internal/git/localrepo/remote_extra_test.go
+++ b/internal/git/localrepo/remote_extra_test.go
@@ -47,7 +47,7 @@ func TestRepo_FetchInternal(t *testing.T) {
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithGitCommandFactory(gitCmdFactory), testserver.WithDisableMetadataForceCreation())
+ }, testserver.WithGitCommandFactory(gitCmdFactory))
remoteRepoProto, _ := gittest.CreateRepository(ctx, t, cfg, gittest.CreateRepositoryConfig{
Seed: gittest.SeedGitLabTest,
diff --git a/internal/git/remoterepo/repository_test.go b/internal/git/remoterepo/repository_test.go
index 2c4b6279f..f11643d50 100644
--- a/internal/git/remoterepo/repository_test.go
+++ b/internal/git/remoterepo/repository_test.go
@@ -47,7 +47,7 @@ func TestRepository(t *testing.T) {
deps.GetTxManager(),
deps.GetCatfileCache(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
pool := client.NewPool()
defer pool.Close()
diff --git a/internal/gitaly/service/blob/testhelper_test.go b/internal/gitaly/service/blob/testhelper_test.go
index 6184f6992..66e0899dd 100644
--- a/internal/gitaly/service/blob/testhelper_test.go
+++ b/internal/gitaly/service/blob/testhelper_test.go
@@ -39,7 +39,7 @@ func setup(ctx context.Context, tb testing.TB) (config.Cfg, *gitalypb.Repository
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
cfg.SocketPath = addr
conn, err := grpc.Dial(addr, grpc.WithInsecure())
diff --git a/internal/gitaly/service/cleanup/testhelper_test.go b/internal/gitaly/service/cleanup/testhelper_test.go
index d66655c78..f39f747e7 100644
--- a/internal/gitaly/service/cleanup/testhelper_test.go
+++ b/internal/gitaly/service/cleanup/testhelper_test.go
@@ -53,7 +53,7 @@ func runCleanupServiceServer(t *testing.T, cfg config.Cfg) string {
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
}
func newCleanupServiceClient(t *testing.T, serverSocketPath string) (gitalypb.CleanupServiceClient, *grpc.ClientConn) {
diff --git a/internal/gitaly/service/commit/testhelper_test.go b/internal/gitaly/service/commit/testhelper_test.go
index ad1e1b41e..e31b14675 100644
--- a/internal/gitaly/service/commit/testhelper_test.go
+++ b/internal/gitaly/service/commit/testhelper_test.go
@@ -86,7 +86,7 @@ func startTestServices(t testing.TB, cfg config.Cfg) string {
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
}
func newCommitServiceClient(t testing.TB, serviceSocketPath string) gitalypb.CommitServiceClient {
diff --git a/internal/gitaly/service/conflicts/testhelper_test.go b/internal/gitaly/service/conflicts/testhelper_test.go
index 62cba45c3..82bb90d7d 100644
--- a/internal/gitaly/service/conflicts/testhelper_test.go
+++ b/internal/gitaly/service/conflicts/testhelper_test.go
@@ -83,7 +83,7 @@ func runConflictsServer(t testing.TB, cfg config.Cfg, hookManager hook.Manager)
deps.GetLinguist(),
deps.GetCatfileCache(),
))
- }, testserver.WithHookManager(hookManager), testserver.WithDisableMetadataForceCreation())
+ }, testserver.WithHookManager(hookManager))
}
func NewConflictsClient(t testing.TB, serverSocketPath string) (gitalypb.ConflictsServiceClient, *grpc.ClientConn) {
diff --git a/internal/gitaly/service/diff/testhelper_test.go b/internal/gitaly/service/diff/testhelper_test.go
index ed5455612..0436d6d8a 100644
--- a/internal/gitaly/service/diff/testhelper_test.go
+++ b/internal/gitaly/service/diff/testhelper_test.go
@@ -23,8 +23,6 @@ func TestMain(m *testing.M) {
func setupDiffService(ctx context.Context, t testing.TB, opt ...testserver.GitalyServerOpt) (config.Cfg, *gitalypb.Repository, string, gitalypb.DiffServiceClient) {
cfg := testcfg.Build(t)
- opt = append(opt, testserver.WithDisableMetadataForceCreation())
-
addr := testserver.RunGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterDiffServiceServer(srv, NewServer(
deps.GetLocator(),
diff --git a/internal/gitaly/service/objectpool/testhelper_test.go b/internal/gitaly/service/objectpool/testhelper_test.go
index d6b1dcd4f..b1e5ddd4c 100644
--- a/internal/gitaly/service/objectpool/testhelper_test.go
+++ b/internal/gitaly/service/objectpool/testhelper_test.go
@@ -51,8 +51,6 @@ func setup(ctx context.Context, t *testing.T, opts ...testserver.GitalyServerOpt
}
func runObjectPoolServer(t *testing.T, cfg config.Cfg, locator storage.Locator, logger *logrus.Logger, opts ...testserver.GitalyServerOpt) string {
- opts = append(opts, testserver.WithDisableMetadataForceCreation())
-
return testserver.RunGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterObjectPoolServiceServer(srv, NewServer(
deps.GetLocator(),
diff --git a/internal/gitaly/service/operations/testhelper_test.go b/internal/gitaly/service/operations/testhelper_test.go
index 625b39c86..3c33df632 100644
--- a/internal/gitaly/service/operations/testhelper_test.go
+++ b/internal/gitaly/service/operations/testhelper_test.go
@@ -67,8 +67,6 @@ func setupOperationsServiceWithCfg(
func runOperationServiceServer(t testing.TB, cfg config.Cfg, options ...testserver.GitalyServerOpt) string {
t.Helper()
- options = append(options, testserver.WithDisableMetadataForceCreation())
-
return testserver.RunGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
operationServer := NewServer(
deps.GetHookManager(),
diff --git a/internal/gitaly/service/ref/delete_refs_test.go b/internal/gitaly/service/ref/delete_refs_test.go
index a922685fc..73b1a78d6 100644
--- a/internal/gitaly/service/ref/delete_refs_test.go
+++ b/internal/gitaly/service/ref/delete_refs_test.go
@@ -106,7 +106,7 @@ func TestDeleteRefs_transaction(t *testing.T) {
deps.GetGit2goExecutor(),
))
gitalypb.RegisterHookServiceServer(srv, hookservice.NewServer(deps.GetHookManager(), deps.GetGitCmdFactory(), deps.GetPackObjectsCache()))
- }, testserver.WithTransactionManager(txManager), testserver.WithDisableMetadataForceCreation())
+ }, testserver.WithTransactionManager(txManager))
cfg.SocketPath = addr
client, conn := newRefServiceClient(t, addr)
diff --git a/internal/gitaly/service/ref/testhelper_test.go b/internal/gitaly/service/ref/testhelper_test.go
index 7fc6e0485..723c990ec 100644
--- a/internal/gitaly/service/ref/testhelper_test.go
+++ b/internal/gitaly/service/ref/testhelper_test.go
@@ -75,7 +75,7 @@ func runRefServiceServer(t testing.TB, cfg config.Cfg) string {
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
}
func newRefServiceClient(t testing.TB, serverSocketPath string) (gitalypb.RefServiceClient, *grpc.ClientConn) {
diff --git a/internal/gitaly/service/remote/testhelper_test.go b/internal/gitaly/service/remote/testhelper_test.go
index 00315a404..9b080758e 100644
--- a/internal/gitaly/service/remote/testhelper_test.go
+++ b/internal/gitaly/service/remote/testhelper_test.go
@@ -24,8 +24,6 @@ func setupRemoteService(ctx context.Context, t *testing.T, opts ...testserver.Gi
cfg := testcfg.Build(t)
- opts = append(opts, testserver.WithDisableMetadataForceCreation())
-
addr := testserver.RunGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterRemoteServiceServer(srv, NewServer(
deps.GetLocator(),
diff --git a/internal/gitaly/service/repository/testhelper_test.go b/internal/gitaly/service/repository/testhelper_test.go
index e50ec6eb6..cb9f4366c 100644
--- a/internal/gitaly/service/repository/testhelper_test.go
+++ b/internal/gitaly/service/repository/testhelper_test.go
@@ -116,8 +116,6 @@ func assertModTimeAfter(t *testing.T, afterTime time.Time, paths ...string) bool
}
func runRepositoryServerWithConfig(t testing.TB, cfg config.Cfg, rubySrv *rubyserver.Server, opts ...testserver.GitalyServerOpt) string {
- opts = append(opts, testserver.WithDisableMetadataForceCreation())
-
return testserver.RunGitalyServer(t, cfg, rubySrv, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterRepositoryServiceServer(srv, NewServer(
cfg,
diff --git a/internal/gitaly/service/smarthttp/testhelper_test.go b/internal/gitaly/service/smarthttp/testhelper_test.go
index aab400d78..3588f4fc3 100644
--- a/internal/gitaly/service/smarthttp/testhelper_test.go
+++ b/internal/gitaly/service/smarthttp/testhelper_test.go
@@ -27,8 +27,6 @@ func TestMain(m *testing.M) {
}
func startSmartHTTPServerWithOptions(t *testing.T, cfg config.Cfg, opts []ServerOpt, serverOpts []testserver.GitalyServerOpt) testserver.GitalyServer {
- serverOpts = append(serverOpts, testserver.WithDisableMetadataForceCreation())
-
return testserver.StartGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterSmartHTTPServiceServer(srv, NewServer(
deps.GetLocator(),
diff --git a/internal/gitaly/service/ssh/testhelper_test.go b/internal/gitaly/service/ssh/testhelper_test.go
index 8f5693b8f..5346ce1e0 100644
--- a/internal/gitaly/service/ssh/testhelper_test.go
+++ b/internal/gitaly/service/ssh/testhelper_test.go
@@ -22,7 +22,6 @@ func runSSHServer(t *testing.T, cfg config.Cfg, serverOpts ...testserver.GitalyS
}
func runSSHServerWithOptions(t *testing.T, cfg config.Cfg, opts []ServerOpt, serverOpts ...testserver.GitalyServerOpt) string {
- serverOpts = append(serverOpts, testserver.WithDisableMetadataForceCreation())
return testserver.RunGitalyServer(t, cfg, nil, func(srv *grpc.Server, deps *service.Dependencies) {
gitalypb.RegisterSSHServiceServer(srv, NewServer(
deps.GetLocator(),
diff --git a/internal/gitaly/service/wiki/testhelper_test.go b/internal/gitaly/service/wiki/testhelper_test.go
index 9546eef03..01223a96c 100644
--- a/internal/gitaly/service/wiki/testhelper_test.go
+++ b/internal/gitaly/service/wiki/testhelper_test.go
@@ -87,7 +87,7 @@ func setupWikiService(t testing.TB, cfg config.Cfg, rubySrv *rubyserver.Server)
deps.GetConnsPool(),
deps.GetGit2goExecutor(),
))
- }, testserver.WithDisableMetadataForceCreation())
+ })
testcfg.BuildGitalyHooks(t, cfg)
client := newWikiClient(t, addr)
return client, addr
diff --git a/internal/praefect/config/config.go b/internal/praefect/config/config.go
index 9d128a862..286577d6a 100644
--- a/internal/praefect/config/config.go
+++ b/internal/praefect/config/config.go
@@ -138,10 +138,6 @@ type Config struct {
MemoryQueueEnabled bool `toml:"memory_queue_enabled,omitempty"`
GracefulStopTimeout config.Duration `toml:"graceful_stop_timeout,omitempty"`
RepositoriesCleanup RepositoriesCleanup `toml:"repositories_cleanup,omitempty"`
- // ForceCreateRepositories will enable force-creation of repositories in the
- // coordinator when routing repository-scoped mutators. This must never be used
- // outside of tests.
- ForceCreateRepositories bool `toml:"force_create_repositories_for_testing_purposes,omitempty"`
}
// VirtualStorage represents a set of nodes for a storage
diff --git a/internal/praefect/coordinator.go b/internal/praefect/coordinator.go
index 2c9ca8c85..48bceae20 100644
--- a/internal/praefect/coordinator.go
+++ b/internal/praefect/coordinator.go
@@ -257,10 +257,6 @@ type Coordinator struct {
conf config.Config
votersMetric *prometheus.HistogramVec
txReplicationCountMetric *prometheus.CounterVec
-
- // forceCreateRepositories will enable force-creation of repositories when routing
- // repository-scoped mutators. This must never be used outside of tests.
- forceCreateRepositories bool
}
// NewCoordinator returns a new Coordinator that utilizes the provided logger
@@ -301,7 +297,6 @@ func NewCoordinator(
},
[]string{"reason"},
),
- forceCreateRepositories: conf.ForceCreateRepositories,
}
return coordinator
@@ -327,42 +322,6 @@ func (c *Coordinator) directRepositoryScopedMessage(ctx context.Context, call gr
var err error
var ps *proxy.StreamParameters
- if c.forceCreateRepositories {
- replicationType, _, err := getReplicationDetails(call.fullMethodName, call.msg)
- if err != nil {
- return nil, err
- }
-
- if replicationType != datastore.CreateRepo {
- relativePaths := []string{call.targetRepo.RelativePath}
-
- if additionalRepo, ok, err := call.methodInfo.AdditionalRepo(call.msg); err != nil {
- return nil, err
- } else if ok {
- relativePaths = append(relativePaths, additionalRepo.RelativePath)
- }
-
- for _, relativePath := range relativePaths {
- // This is a hack for the tests: during execution of the gitaly tests under praefect proxy
- // the repositories are created directly on the filesystem. There is no call for the
- // CreateRepository that creates records in the database that is why we do it artificially
- // before redirecting the calls.
- id, err := c.rs.ReserveRepositoryID(ctx, call.targetRepo.StorageName, relativePath)
- if err != nil {
- if !errors.Is(err, commonerr.ErrRepositoryAlreadyExists) {
- return nil, err
- }
- } else {
- if err := c.rs.CreateRepository(ctx, id, call.targetRepo.StorageName, relativePath, relativePath, call.targetRepo.StorageName, nil, nil, true, true); err != nil {
- if !errors.As(err, &datastore.RepositoryExistsError{}) {
- return nil, err
- }
- }
- }
- }
- }
- }
-
switch call.methodInfo.Operation {
case protoregistry.OpAccessor:
ps, err = c.accessorStreamParameters(ctx, call)
diff --git a/internal/testhelper/testserver/gitaly.go b/internal/testhelper/testserver/gitaly.go
index 5c84038be..3be0b0f7d 100644
--- a/internal/testhelper/testserver/gitaly.go
+++ b/internal/testhelper/testserver/gitaly.go
@@ -48,7 +48,7 @@ func RunGitalyServer(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server
// StartGitalyServer creates and runs gitaly (and praefect as a proxy) server.
func StartGitalyServer(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server, registrar func(srv *grpc.Server, deps *service.Dependencies), opts ...GitalyServerOpt) GitalyServer {
- gitalySrv, gitalyAddr, disablePraefect, disableMetadataForceCreation := runGitaly(t, cfg, rubyServer, registrar, opts...)
+ gitalySrv, gitalyAddr, disablePraefect := runGitaly(t, cfg, rubyServer, registrar, opts...)
if !testhelper.IsPraefectEnabled() || disablePraefect {
return GitalyServer{
@@ -57,7 +57,7 @@ func StartGitalyServer(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Serv
}
}
- praefectServer := runPraefectProxy(t, cfg, gitalyAddr, disableMetadataForceCreation)
+ praefectServer := runPraefectProxy(t, cfg, gitalyAddr)
return GitalyServer{
shutdown: func() {
praefectServer.Shutdown()
@@ -67,7 +67,7 @@ func StartGitalyServer(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Serv
}
}
-func runPraefectProxy(t testing.TB, gitalyCfg config.Cfg, gitalyAddr string, disableMetadataForceCreation bool) PraefectServer {
+func runPraefectProxy(t testing.TB, gitalyCfg config.Cfg, gitalyAddr string) PraefectServer {
return StartPraefect(t, praefectconfig.Config{
SocketPath: testhelper.GetTemporaryGitalySocketFileName(t),
Auth: auth.Config{
@@ -83,7 +83,6 @@ func runPraefectProxy(t testing.TB, gitalyCfg config.Cfg, gitalyAddr string, dis
Format: "json",
Level: "panic",
},
- ForceCreateRepositories: !disableMetadataForceCreation,
VirtualStorages: []*praefectconfig.VirtualStorage{
{
// Only single storage will be served by the Praefect instance. We
@@ -142,7 +141,7 @@ func waitHealthy(t testing.TB, addr string, authToken string) {
require.Equal(t, healthpb.HealthCheckResponse_SERVING, resp.Status, "server not yet ready to serve")
}
-func runGitaly(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server, registrar func(srv *grpc.Server, deps *service.Dependencies), opts ...GitalyServerOpt) (*grpc.Server, string, bool, bool) {
+func runGitaly(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server, registrar func(srv *grpc.Server, deps *service.Dependencies), opts ...GitalyServerOpt) (*grpc.Server, string, bool) {
t.Helper()
var gsd gitalyServerDeps
@@ -214,7 +213,7 @@ func runGitaly(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server, regi
waitHealthy(t, addr, cfg.Auth.Token)
- return externalServer, addr, gsd.disablePraefect, gsd.disableMetadataForceCreation
+ return externalServer, addr, gsd.disablePraefect
}
func registerHealthServerIfNotRegistered(srv *grpc.Server) {
@@ -226,23 +225,22 @@ func registerHealthServerIfNotRegistered(srv *grpc.Server) {
}
type gitalyServerDeps struct {
- disablePraefect bool
- disableMetadataForceCreation bool
- logger *logrus.Logger
- conns *client.Pool
- locator storage.Locator
- txMgr transaction.Manager
- hookMgr hook.Manager
- gitlabClient gitlab.Client
- gitCmdFactory git.CommandFactory
- linguist *linguist.Instance
- backchannelReg *backchannel.Registry
- catfileCache catfile.Cache
- diskCache cache.Cache
- packObjectsCache streamcache.Cache
- limitHandler *limithandler.LimiterMiddleware
- git2goExecutor *git2go.Executor
- updaterWithHooks *updateref.UpdaterWithHooks
+ disablePraefect bool
+ logger *logrus.Logger
+ conns *client.Pool
+ locator storage.Locator
+ txMgr transaction.Manager
+ hookMgr hook.Manager
+ gitlabClient gitlab.Client
+ gitCmdFactory git.CommandFactory
+ linguist *linguist.Instance
+ backchannelReg *backchannel.Registry
+ catfileCache catfile.Cache
+ diskCache cache.Cache
+ packObjectsCache streamcache.Cache
+ limitHandler *limithandler.LimiterMiddleware
+ git2goExecutor *git2go.Executor
+ updaterWithHooks *updateref.UpdaterWithHooks
}
func (gsd *gitalyServerDeps) createDependencies(t testing.TB, cfg config.Cfg, rubyServer *rubyserver.Server) *service.Dependencies {
@@ -393,17 +391,6 @@ func WithDisablePraefect() GitalyServerOpt {
}
}
-// WithDisableMetadataForceCreation disables a testing hack to create repository metadata when Praefect first sees a request
-// for a repository. This can be used to ensure the test does not rely on the force creation behavior after it has been fixed
-// to not depend on it anymore. New tests should use this to avoid adding to the problem. This option can be removed once the hack
-// itself has been removed.
-func WithDisableMetadataForceCreation() GitalyServerOpt {
- return func(deps gitalyServerDeps) gitalyServerDeps {
- deps.disableMetadataForceCreation = true
- return deps
- }
-}
-
// WithBackchannelRegistry sets backchannel.Registry instance that will be used for gitaly services initialisation.
func WithBackchannelRegistry(backchannelReg *backchannel.Registry) GitalyServerOpt {
return func(deps gitalyServerDeps) gitalyServerDeps {