Commit ed4b163b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '216332-remove-ci_pipeline_persisted_stages-feature-flag' into 'master'

Remove `ci_pipeline_persisted_stages` feature flag

See merge request gitlab-org/gitlab!31861
parents 1053131f 2c7d7c67
...@@ -401,7 +401,7 @@ module Ci ...@@ -401,7 +401,7 @@ module Ci
# The `Ci::Stage` contains all up-to date data # The `Ci::Stage` contains all up-to date data
# as atomic processing updates all data in-bulk # as atomic processing updates all data in-bulk
stages stages
elsif Feature.enabled?(:ci_pipeline_persisted_stages, default_enabled: true) && complete? elsif complete?
# The `Ci::Stage` contains up-to date data only for `completed` pipelines # The `Ci::Stage` contains up-to date data only for `completed` pipelines
# this is due to asynchronous processing of pipeline, and stages possibly # this is due to asynchronous processing of pipeline, and stages possibly
# not updated inline with processing of pipeline # not updated inline with processing of pipeline
......
...@@ -26,10 +26,6 @@ describe Projects::PipelinesController do ...@@ -26,10 +26,6 @@ describe Projects::PipelinesController do
context 'when using persisted stages', :request_store do context 'when using persisted stages', :request_store do
render_views render_views
before do
stub_feature_flags(ci_pipeline_persisted_stages: true)
end
it 'returns serialized pipelines' do it 'returns serialized pipelines' do
expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original
...@@ -66,46 +62,6 @@ describe Projects::PipelinesController do ...@@ -66,46 +62,6 @@ describe Projects::PipelinesController do
end end
end end
context 'when using legacy stages', :request_store do
before do
stub_feature_flags(ci_pipeline_persisted_stages: false)
end
it 'returns JSON with serialized pipelines' do
get_pipelines_index_json
expect(response).to have_gitlab_http_status(:ok)
expect(response).to match_response_schema('pipeline')
expect(json_response).to include('pipelines')
expect(json_response['pipelines'].count).to eq 6
expect(json_response['count']['all']).to eq '6'
expect(json_response['count']['running']).to eq '2'
expect(json_response['count']['pending']).to eq '1'
expect(json_response['count']['finished']).to eq '3'
json_response.dig('pipelines', 0, 'details', 'stages').tap do |stages|
expect(stages.count).to eq 3
end
end
it 'does not execute N+1 queries' do
get_pipelines_index_json
control_count = ActiveRecord::QueryRecorder.new do
get_pipelines_index_json
end.count
create_all_pipeline_types
# There appears to be one extra query for Pipelines#has_warnings? for some reason
expect { get_pipelines_index_json }.not_to exceed_query_limit(control_count + 1)
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['pipelines'].count).to eq 12
end
end
it 'does not include coverage data for the pipelines' do it 'does not include coverage data for the pipelines' do
get_pipelines_index_json get_pipelines_index_json
......
...@@ -1007,19 +1007,6 @@ describe Ci::Pipeline, :mailer do ...@@ -1007,19 +1007,6 @@ describe Ci::Pipeline, :mailer do
subject { pipeline.ordered_stages } subject { pipeline.ordered_stages }
context 'when using legacy stages' do
before do
stub_feature_flags(
ci_pipeline_persisted_stages: false,
ci_atomic_processing: false
)
end
it 'returns legacy stages in valid order' do
expect(subject.map(&:name)).to eq %w[build test]
end
end
context 'when using atomic processing' do context 'when using atomic processing' do
before do before do
stub_feature_flags( stub_feature_flags(
...@@ -1051,7 +1038,6 @@ describe Ci::Pipeline, :mailer do ...@@ -1051,7 +1038,6 @@ describe Ci::Pipeline, :mailer do
context 'when using persisted stages' do context 'when using persisted stages' do
before do before do
stub_feature_flags( stub_feature_flags(
ci_pipeline_persisted_stages: true,
ci_atomic_processing: false ci_atomic_processing: false
) )
end end
......
...@@ -10,10 +10,6 @@ describe PipelineSerializer do ...@@ -10,10 +10,6 @@ describe PipelineSerializer do
described_class.new(current_user: user, project: project) described_class.new(current_user: user, project: project)
end end
before do
stub_feature_flags(ci_pipeline_persisted_stages: true)
end
subject { serializer.represent(resource) } subject { serializer.represent(resource) }
describe '#represent' do describe '#represent' 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