diff --git a/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml b/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml new file mode 100644 index 0000000000000000000000000000000000000000..edf11484d1ff854c670debc4882ad1ed971506ff --- /dev/null +++ b/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml @@ -0,0 +1,5 @@ +--- +title: Make Gitaly PostUploadPack mandatory +merge_request: 13953 +author: +type: changed diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index a362a3a0bc643768c62243fa767adf3f7ecf1142..e5ad9b5a40c2df833e426f7d9a88a57f83454c6d 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -35,10 +35,7 @@ module Gitlab when 'git_receive_pack' Gitlab::GitalyClient.feature_enabled?(:post_receive_pack) when 'git_upload_pack' - Gitlab::GitalyClient.feature_enabled?( - :post_upload_pack, - status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT - ) + true when 'info_refs' true else diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index b66afafa174d33626d263eddd3392d5631e19a29..699184ad9fe291dc105e65a4a6bc9893b4107887 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -228,21 +228,10 @@ describe Gitlab::Workhorse do let(:action) { 'git_upload_pack' } let(:feature_flag) { :post_upload_pack } - context 'when action is enabled by feature flag' do - it 'includes Gitaly params in the returned value' do - allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag).and_return(true) + it 'includes Gitaly params in the returned value' do + allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag).and_return(true) - expect(subject).to include(gitaly_params) - end - end - - context 'when action is not enabled by feature flag' do - it 'does not include Gitaly params in the returned value' do - status_opt_out = Gitlab::GitalyClient::MigrationStatus::OPT_OUT - allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag, status: status_opt_out).and_return(false) - - expect(subject).not_to include(gitaly_params) - end + expect(subject).to include(gitaly_params) end end