diff --git a/app/helpers/blame_helper.rb b/app/helpers/blame_helper.rb index f25917407a764919493b08484795eae8c7d3159f..56d651a8b6568a61668fba24623be7e6483c8d55 100644 --- a/app/helpers/blame_helper.rb +++ b/app/helpers/blame_helper.rb @@ -44,11 +44,7 @@ def blame_pages_streaming_url(id, project) namespace_project_blame_page_url(namespace_id: project.namespace, project_id: project, id: id, streaming: true) end - def entire_blame_path(id, project, blame_mode) - if blame_mode.streaming_supported? - namespace_project_blame_streaming_path(namespace_id: project.namespace, project_id: project, id: id) - else - namespace_project_blame_path(namespace_id: project.namespace, project_id: project, id: id, no_pagination: true) - end + def entire_blame_path(id, project) + namespace_project_blame_streaming_path(namespace_id: project.namespace, project_id: project, id: id) end end diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index a56d398d3a094f1079a30b2c7459da1c45c368ae..e2cad2fb3d7df13c54387a562c0f04cfaba91e95 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -42,7 +42,7 @@ - if @blame_mode.pagination? && @blame_pagination.total_pages > 1 .gl-display-flex.gl-justify-content-center.gl-flex-direction-column.gl-align-items-center.gl-p-3.gl-bg-gray-50.gl-border-t-solid.gl-border-t-1.gl-border-gray-100 - = render Pajamas::ButtonComponent.new(href: entire_blame_path(@id, @project, @blame_mode), size: :small, button_options: { class: 'gl-mt-3' }) do |c| + = render Pajamas::ButtonComponent.new(href: entire_blame_path(@id, @project), size: :small, button_options: { class: 'gl-mt-3' }) do |c| = _('Show full blame') - if @blame_mode.streaming? diff --git a/config/feature_flags/development/blame_page_streaming.yml b/config/feature_flags/development/blame_page_streaming.yml deleted file mode 100644 index 44d64800dabe62dd0d361cd3ebf045328db02582..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/blame_page_streaming.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: blame_page_streaming -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/110208 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/392890 -milestone: '15.10' -type: development -group: group::source code -default_enabled: false diff --git a/lib/gitlab/git/blame_mode.rb b/lib/gitlab/git/blame_mode.rb index d8fc8fece068fe0ea26c6d8ca7496498d1c26cc0..15200e3888c539e840f11f513b53b820129f727e 100644 --- a/lib/gitlab/git/blame_mode.rb +++ b/lib/gitlab/git/blame_mode.rb @@ -8,13 +8,7 @@ def initialize(project, params) @params = params end - def streaming_supported? - Feature.enabled?(:blame_page_streaming, project) - end - def streaming? - return false unless streaming_supported? - Gitlab::Utils.to_boolean(params[:streaming], default: false) end diff --git a/spec/features/projects/blobs/blame_spec.rb b/spec/features/projects/blobs/blame_spec.rb index 6f5bf8ac26e08b3e675abfa7b4f8ea692abf92f7..c5379cf56c02e9114ed1dfe236b7e6a583763595 100644 --- a/spec/features/projects/blobs/blame_spec.rb +++ b/spec/features/projects/blobs/blame_spec.rb @@ -102,14 +102,6 @@ def visit_blob_blame(path) end end - context 'when streaming is disabled' do - before do - stub_feature_flags(blame_page_streaming: false) - end - - it_behaves_like 'a full blame page' - end - context 'when streaming is enabled' do before do stub_const('Gitlab::Git::BlamePagination::STREAMING_PER_PAGE', 50) diff --git a/spec/helpers/blame_helper_spec.rb b/spec/helpers/blame_helper_spec.rb index 54d714b2038866b01639a4dbec1c9803a9836759..30670064d935ee03d1cb5d923345bfcc9c62cde1 100644 --- a/spec/helpers/blame_helper_spec.rb +++ b/spec/helpers/blame_helper_spec.rb @@ -69,23 +69,12 @@ end describe '#entire_blame_path' do - subject { helper.entire_blame_path(id, project, blame_mode) } + subject { helper.entire_blame_path(id, project) } let_it_be(:project) { build_stubbed(:project) } let(:id) { 'main/README.md' } - let(:blame_mode) { instance_double('Gitlab::Git::BlameMode', 'streaming_supported?' => streaming_enabled) } - context 'when streaming is supported' do - let(:streaming_enabled) { true } - - it { is_expected.to eq "/#{project.full_path}/-/blame/#{id}/streaming" } - end - - context 'when streaming is not supported' do - let(:streaming_enabled) { false } - - it { is_expected.to eq "/#{project.full_path}/-/blame/#{id}?no_pagination=true" } - end + it { is_expected.to eq "/#{project.full_path}/-/blame/#{id}/streaming" } end end diff --git a/spec/lib/gitlab/git/blame_mode_spec.rb b/spec/lib/gitlab/git/blame_mode_spec.rb index 1fc6f12c55251de090ba65cc851f543b48c1d623..3496b763f924dfec01a50dd84c34d401fa4d7fc1 100644 --- a/spec/lib/gitlab/git/blame_mode_spec.rb +++ b/spec/lib/gitlab/git/blame_mode_spec.rb @@ -8,20 +8,6 @@ let_it_be(:project) { build(:project) } let(:params) { {} } - describe '#streaming_supported?' do - subject { blame_mode.streaming_supported? } - - it { is_expected.to be_truthy } - - context 'when `blame_page_streaming` is disabled' do - before do - stub_feature_flags(blame_page_streaming: false) - end - - it { is_expected.to be_falsey } - end - end - describe '#streaming?' do subject { blame_mode.streaming? } @@ -31,14 +17,6 @@ let(:params) { { streaming: true } } it { is_expected.to be_truthy } - - context 'when `blame_page_streaming` is disabled' do - before do - stub_feature_flags(blame_page_streaming: false) - end - - it { is_expected.to be_falsey } - end end end