diff --git a/files/gitlab-cookbooks/praefect/libraries/praefect.rb b/files/gitlab-cookbooks/praefect/libraries/praefect.rb index b40d6569ecb74298a4aee6579b97b51b1423f4ec_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9saWJyYXJpZXMvcHJhZWZlY3QucmI=..a8b13ff765f6ff92f0f4b0379016fba3aef3c1da_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9saWJyYXJpZXMvcHJhZWZlY3QucmI= 100644 --- a/files/gitlab-cookbooks/praefect/libraries/praefect.rb +++ b/files/gitlab-cookbooks/praefect/libraries/praefect.rb @@ -17,7 +17,7 @@ config_path = File.join(praefect_dir, 'config.toml') begin - per_repository_configured = File.foreach(config_path).include?("election_strategy = 'per_repository'") + per_repository_configured = !File.foreach(config_path).grep(/election_strategy = 'per_repository'/).empty? # The previous behavior was to use 'sql' election strategy unless something else was explicitly configured. # Given that, it's fine to fallback to 'sql' if the config does not contain 'per_repository' # election strategy. If the config contains 'per_repository' but the value was not explicitly set, then we've