diff --git a/files/gitlab-cookbooks/gitaly/attributes/default.rb b/files/gitlab-cookbooks/gitaly/attributes/default.rb index c24ace64c958272ede3df3e9773feefe6f23a991_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvYXR0cmlidXRlcy9kZWZhdWx0LnJi..098f8e5e2cbd6725214e5aa9c43207309f1f9835_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvYXR0cmlidXRlcy9kZWZhdWx0LnJi 100644 --- a/files/gitlab-cookbooks/gitaly/attributes/default.rb +++ b/files/gitlab-cookbooks/gitaly/attributes/default.rb @@ -24,7 +24,6 @@ default['gitaly']['auth_transitioning'] = false default['gitaly']['git_catfile_cache_size'] = nil default['gitaly']['git_bin_path'] = "#{node['package']['install-dir']}/embedded/bin/git" -default['gitaly']['ignore_gitconfig'] = false default['gitaly']['use_bundled_git'] = true default['gitaly']['open_files_ulimit'] = 15000 default['gitaly']['ruby_max_rss'] = nil diff --git a/files/gitlab-cookbooks/gitaly/libraries/gitaly.rb b/files/gitlab-cookbooks/gitaly/libraries/gitaly.rb index c24ace64c958272ede3df3e9773feefe6f23a991_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvbGlicmFyaWVzL2dpdGFseS5yYg==..098f8e5e2cbd6725214e5aa9c43207309f1f9835_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvbGlicmFyaWVzL2dpdGFseS5yYg== 100644 --- a/files/gitlab-cookbooks/gitaly/libraries/gitaly.rb +++ b/files/gitlab-cookbooks/gitaly/libraries/gitaly.rb @@ -77,14 +77,6 @@ # Compute the default gitconfig from the old Omnibus gitconfig setting. # This depends on the Gitlab cookbook having been parsed already. def parse_gitconfig - # For the time being we require explicit opt-in to ignore the gitconfig - # and instead use the new mechanism. This is to ensure that we can test - # in staging first before we roll out this change to production. - # - # Note: this flag is only intended for use in `gitlab.com` to transition - # to the new default. - return unless Gitlab['gitaly']['ignore_gitconfig'] - # If the administrator has set `gitaly['gitconfig']` then we do not add a # fallback gitconfig. return unless Gitlab['gitaly']['gitconfig'].nil? diff --git a/files/gitlab-cookbooks/gitaly/templates/default/gitaly-config.toml.erb b/files/gitlab-cookbooks/gitaly/templates/default/gitaly-config.toml.erb index c24ace64c958272ede3df3e9773feefe6f23a991_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvdGVtcGxhdGVzL2RlZmF1bHQvZ2l0YWx5LWNvbmZpZy50b21sLmVyYg==..098f8e5e2cbd6725214e5aa9c43207309f1f9835_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9naXRhbHkvdGVtcGxhdGVzL2RlZmF1bHQvZ2l0YWx5LWNvbmZpZy50b21sLmVyYg== 100644 --- a/files/gitlab-cookbooks/gitaly/templates/default/gitaly-config.toml.erb +++ b/files/gitlab-cookbooks/gitaly/templates/default/gitaly-config.toml.erb @@ -82,9 +82,8 @@ <% if @use_bundled_git %> use_bundled_binaries = <%= @use_bundled_git %> <% end %> -<% if @ignore_gitconfig %> # Ignore gitconfig files so that the only source of truth for how Git commands # are configured are Gitaly's own defaults and the Git configuration injected # in this file. ignore_gitconfig = true @@ -86,11 +85,11 @@ # Ignore gitconfig files so that the only source of truth for how Git commands # are configured are Gitaly's own defaults and the Git configuration injected # in this file. ignore_gitconfig = true - <% if @gitconfig %> - <% @gitconfig.each do |gitconfig| %> +<% if @gitconfig %> + <% @gitconfig.each do |gitconfig| %> [[git.config]] key = "<%= gitconfig['key'] %>" value = "<%= gitconfig['value'] %>" @@ -93,8 +92,7 @@ [[git.config]] key = "<%= gitconfig['key'] %>" value = "<%= gitconfig['value'] %>" - <% end %> <% end %> <% end %> [gitaly-ruby] diff --git a/spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb b/spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb index c24ace64c958272ede3df3e9773feefe6f23a991_c3BlYy9jaGVmL2Nvb2tib29rcy9naXRhbHkvcmVjaXBlcy9naXRhbHlfc3BlYy5yYg==..098f8e5e2cbd6725214e5aa9c43207309f1f9835_c3BlYy9jaGVmL2Nvb2tib29rcy9naXRhbHkvcmVjaXBlcy9naXRhbHlfc3BlYy5yYg== 100644 --- a/spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb +++ b/spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb @@ -219,7 +219,6 @@ context 'with Omnibus gitconfig' do let(:omnibus_gitconfig) { nil } let(:gitaly_gitconfig) { nil } - let(:ignore_gitconfig) { true } before do stub_gitlab_rb( @@ -228,7 +227,6 @@ }, gitaly: { gitconfig: gitaly_gitconfig, - ignore_gitconfig: ignore_gitconfig, } ) end @@ -365,28 +363,6 @@ } end end - - context 'with ignore_gitconfig disabled' do - let(:ignore_gitconfig) { false } - let(:gitaly_gitconfig) do - [ - { key: "some.value", value: "overridden" }, - ] - end - - let(:omnibus_gitconfig) do - { - some: ["value = overridden"], - } - end - - it 'does not write [[git.config]] sections' do - expect(chef_run).to render_file(config_path).with_content { |content| - expect(content).not_to include("ignore_gitconfig") - expect(content).not_to include("git.config") - } - end - end end context 'with user settings' do