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:
authorToon Claes <toon@gitlab.com>2022-09-08 22:39:43 +0300
committerToon Claes <toon@gitlab.com>2022-10-03 16:26:16 +0300
commit19c093150080262b0ba794317083c476e3c14976 (patch)
treee42402649f2f44850f691057d69a6827133225f5
parent7b49c61f7b3042de9596a73e321b5c936c9117f9 (diff)
config: Remove linguist languages path
Now we're no longer loading language colors from a json file, it also does not make sense to make the path of this json file configurable. So remove it from the config.
-rw-r--r--doc/configuration/README.md1
-rw-r--r--internal/gitaly/config/ruby.go1
-rw-r--r--internal/gitaly/service/commit/languages_test.go2
-rw-r--r--internal/testhelper/testcfg/gitaly_builder.go16
4 files changed, 1 insertions, 19 deletions
diff --git a/doc/configuration/README.md b/doc/configuration/README.md
index 0f7658bf1..4f29c3e69 100644
--- a/doc/configuration/README.md
+++ b/doc/configuration/README.md
@@ -146,7 +146,6 @@ max\_rss limit.
|graceful_restart_timeout|string|no|Grace period to allow a gitaly-ruby process to finish ongoing requests. Default 10 minutes ("10m").|
|restart_delay|string|no|Time memory must be high before a restart is triggered, in seconds. Default 5 minutes ("5m").|
|num_workers|integer|no|Number of gitaly-ruby worker processes. Try increasing this number in case of ResourceExhausted errors. Default 2, minimum 2.|
-|linguist_languages_path|string|no|Override for dynamic languages.json discovery. Default: "" (use dynamic discovery).|
### Logging
diff --git a/internal/gitaly/config/ruby.go b/internal/gitaly/config/ruby.go
index 92fa70c60..f9c2358da 100644
--- a/internal/gitaly/config/ruby.go
+++ b/internal/gitaly/config/ruby.go
@@ -15,7 +15,6 @@ type Ruby struct {
GracefulRestartTimeout duration.Duration `toml:"graceful_restart_timeout"`
RestartDelay duration.Duration `toml:"restart_delay"`
NumWorkers int `toml:"num_workers"`
- LinguistLanguagesPath string `toml:"linguist_languages_path"`
RuggedGitConfigSearchPath string `toml:"rugged_git_config_search_path"`
}
diff --git a/internal/gitaly/service/commit/languages_test.go b/internal/gitaly/service/commit/languages_test.go
index fed295ff7..71a79c0ce 100644
--- a/internal/gitaly/service/commit/languages_test.go
+++ b/internal/gitaly/service/commit/languages_test.go
@@ -22,7 +22,7 @@ func TestLanguages(t *testing.T) {
func testLanguagesFeatured(t *testing.T, ctx context.Context) {
t.Parallel()
- cfg := testcfg.Build(t, testcfg.WithRealLinguist())
+ cfg := testcfg.Build(t)
cfg.SocketPath = startTestServices(t, cfg)
diff --git a/internal/testhelper/testcfg/gitaly_builder.go b/internal/testhelper/testcfg/gitaly_builder.go
index e8aead0f4..fbac1e797 100644
--- a/internal/testhelper/testcfg/gitaly_builder.go
+++ b/internal/testhelper/testcfg/gitaly_builder.go
@@ -40,13 +40,6 @@ func WithStorages(name string, names ...string) Option {
}
}
-// WithRealLinguist suppress stubbing of the linguist language detection.
-func WithRealLinguist() Option {
- return func(builder *GitalyCfgBuilder) {
- builder.realLinguist = true
- }
-}
-
// WithPackObjectsCacheEnabled enables the pack object cache.
func WithPackObjectsCacheEnabled() Option {
return func(builder *GitalyCfgBuilder) {
@@ -70,7 +63,6 @@ type GitalyCfgBuilder struct {
cfg config.Cfg
storages []string
- realLinguist bool
packObjectsCacheEnabled bool
}
@@ -134,14 +126,6 @@ func (gc *GitalyCfgBuilder) Build(tb testing.TB) config.Cfg {
}
}
- if !gc.realLinguist {
- if cfg.Ruby.LinguistLanguagesPath == "" {
- // set a stub to prevent a long ruby process to run where it is not needed
- cfg.Ruby.LinguistLanguagesPath = filepath.Join(root, "linguist_languages.json")
- require.NoError(tb, os.WriteFile(cfg.Ruby.LinguistLanguagesPath, []byte(`{}`), 0o655))
- }
- }
-
cfg.PackObjectsCache.Enabled = gc.packObjectsCacheEnabled
// Ignore the gitconfig so that tests aren't impacted by any configuration the user happens
// to have lying around.