Commit e7e638b5 authored by Jarka Košanová's avatar Jarka Košanová

Merge branch '275997-remove-ci_auto_cancel_all_pipelines' into 'master'

Remove FF ci_auto_cancel_all_pipelines

See merge request gitlab-org/gitlab!52421
parents a2973bc3 c2c7745d
---
name: ci_auto_cancel_all_pipelines
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46686
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/275997
milestone: '13.6'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -25,7 +25,7 @@ module Gitlab ...@@ -25,7 +25,7 @@ module Gitlab
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def auto_cancelable_pipelines def auto_cancelable_pipelines
pipelines project.all_pipelines.ci_and_parent_sources
.where(ref: pipeline.ref) .where(ref: pipeline.ref)
.where.not(id: pipeline.same_family_pipeline_ids) .where.not(id: pipeline.same_family_pipeline_ids)
.where.not(sha: project.commit(pipeline.ref).try(:id)) .where.not(sha: project.commit(pipeline.ref).try(:id))
...@@ -33,14 +33,6 @@ module Gitlab ...@@ -33,14 +33,6 @@ module Gitlab
.with_only_interruptible_builds .with_only_interruptible_builds
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
def pipelines
if ::Feature.enabled?(:ci_auto_cancel_all_pipelines, project, default_enabled: true)
project.all_pipelines.ci_and_parent_sources
else
project.ci_pipelines
end
end
end end
end end
end end
......
...@@ -58,20 +58,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::CancelPendingPipelines do ...@@ -58,20 +58,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::CancelPendingPipelines do
expect(build_statuses(child_pipeline)).to contain_exactly('canceled') expect(build_statuses(child_pipeline)).to contain_exactly('canceled')
end end
context 'when FF ci_auto_cancel_all_pipelines is disabled' do
before do
stub_feature_flags(ci_auto_cancel_all_pipelines: false)
end
it 'does not cancel interruptible builds of child pipeline' do
expect(build_statuses(child_pipeline)).to contain_exactly('running')
perform
expect(build_statuses(child_pipeline)).to contain_exactly('running')
end
end
end end
context 'when the child pipeline has not an interruptible job' do context 'when the child pipeline has not an interruptible job' 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