Commit d15aeafe authored by Lee Tickett's avatar Lee Tickett Committed by Nick Thomas

Remove `git_archive_path` feature flag

parent 1ccb939f
......@@ -12,7 +12,6 @@
%h5.m-0.dropdown-bold-header= _('Download source code')
.dropdown-menu-content
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil
- if Feature.enabled?(:git_archive_path, default_enabled: true)
- if vue_file_list_enabled?
#js-directory-downloads{ data: { links: directory_download_links(project, ref, archive_prefix).to_json } }
- elsif directory?
......
---
title: Remove git_archive_path feature flag
merge_request: 29369
author: Lee Tickett
type: other
......@@ -62,9 +62,6 @@ module Gitlab
end
def send_git_archive(repository, ref:, format:, append_sha:, path: nil)
path_enabled = Feature.enabled?(:git_archive_path, default_enabled: true)
path = nil unless path_enabled
format ||= 'tar.gz'
format = format.downcase
......@@ -78,12 +75,7 @@ module Gitlab
raise "Repository or ref not found" if metadata.empty?
params =
if path_enabled
send_git_archive_params(repository, metadata, path, archive_format(format))
else
metadata
end
params = send_git_archive_params(repository, metadata, path, archive_format(format))
# If present, DisableCache must be a Boolean. Otherwise
# workhorse ignores it.
......
......@@ -24,7 +24,7 @@ describe Gitlab::Workhorse do
let(:ref) { 'master' }
let(:format) { 'zip' }
let(:storage_path) { Gitlab.config.gitlab.repository_downloads_path }
let(:path) { 'some/path' if Feature.enabled?(:git_archive_path, default_enabled: true) }
let(:path) { 'some/path' }
let(:metadata) { repository.archive_metadata(ref, storage_path, format, append_sha: nil, path: path) }
let(:cache_disabled) { false }
......@@ -36,39 +36,6 @@ describe Gitlab::Workhorse do
allow(described_class).to receive(:git_archive_cache_disabled?).and_return(cache_disabled)
end
context 'feature flag disabled' do
before do
stub_feature_flags(git_archive_path: false)
end
it 'sets the header correctly' do
key, command, params = decode_workhorse_header(subject)
expected_params = metadata.merge(
'GitalyRepository' => repository.gitaly_repository.to_h,
'GitalyServer' => {
features: { 'gitaly-feature-foobar' => 'true' },
address: Gitlab::GitalyClient.address(project.repository_storage),
token: Gitlab::GitalyClient.token(project.repository_storage)
}
)
expect(key).to eq('Gitlab-Workhorse-Send-Data')
expect(command).to eq('git-archive')
expect(params).to eq(expected_params.deep_stringify_keys)
end
context 'when archive caching is disabled' do
let(:cache_disabled) { true }
it 'tells workhorse not to use the cache' do
_, _, params = decode_workhorse_header(subject)
expect(params).to include({ 'DisableCache' => true })
end
end
end
context 'feature flag enabled' do
it 'sets the header correctly' do
key, command, params = decode_workhorse_header(subject)
......@@ -101,7 +68,6 @@ describe Gitlab::Workhorse do
expect(params).to include({ 'DisableCache' => true })
end
end
end
context "when the repository doesn't have an archive file path" do
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment