Commit 875aa43e authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'remove_ci_dag_support_feature_flag' into 'master'

Remove `ci_dag_support` feature flag

Closes #206902

See merge request gitlab-org/gitlab!28863
parents 43f185f3 e0796fe8
......@@ -67,7 +67,6 @@ module Ci
end
def from_needs(scope)
return scope unless Feature.enabled?(:ci_dag_support, project, default_enabled: true)
return scope unless processable.scheduling_type_dag?
needs_names = processable.needs.artifacts.select(:name)
......
......@@ -25,8 +25,6 @@ module Ci
end
def self.select_with_aggregated_needs(project)
return all unless Feature.enabled?(:ci_dag_support, project, default_enabled: true)
aggregated_needs_names = Ci::BuildNeed
.scoped_build
.select("ARRAY_AGG(name)")
......
......@@ -93,7 +93,7 @@ module Ci
end
def processable_status(processable)
if Feature.enabled?(:ci_dag_support, project, default_enabled: true) && processable.scheduling_type_dag?
if processable.scheduling_type_dag?
# Processable uses DAG, get status of all dependent needs
@collection.status_for_names(processable.aggregated_needs_names.to_a)
else
......
......@@ -43,8 +43,6 @@ module Ci
end
def process_dag_builds_without_needs
return false unless Feature.enabled?(:ci_dag_support, project, default_enabled: true)
created_processables.scheduling_type_dag.without_needs.each do |build|
process_build(build, 'success')
end
......@@ -52,7 +50,6 @@ module Ci
def process_dag_builds_with_needs(trigger_build_ids)
return false unless trigger_build_ids.present?
return false unless Feature.enabled?(:ci_dag_support, project, default_enabled: true)
# we find processables that are dependent:
# 1. because of current dependency,
......@@ -110,11 +107,7 @@ module Ci
end
def created_stage_scheduled_processables
if Feature.enabled?(:ci_dag_support, project, default_enabled: true)
created_processables.scheduling_type_stage
else
created_processables
end
created_processables.scheduling_type_stage
end
def created_processables
......
---
title: Remove `ci_dag_support` feature flag
merge_request: 28863
author: Lee Tickett
type: added
......@@ -4,7 +4,7 @@ type: reference
# Directed Acyclic Graph
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/47063) in GitLab 12.2 (enabled by `ci_dag_support` feature flag).
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/47063) in GitLab 12.2.
A [directed acyclic graph](https://www.techopedia.com/definition/5739/directed-acyclic-graph-dag) can be
used in the context of a CI/CD pipeline to build relationships between jobs such that
......
......@@ -96,14 +96,6 @@ describe Ci::BuildDependencies do
end
it { is_expected.to contain_exactly(build, rspec_test, staging) }
context 'when ci_dag_support is disabled' do
before do
stub_feature_flags(ci_dag_support: false)
end
it { is_expected.to contain_exactly(build, rspec_test, rubocop_test, staging) }
end
end
context 'when need artifacts are defined' do
......
......@@ -25,20 +25,6 @@ describe Ci::Processable do
it 'returns all needs' do
expect(with_aggregated_needs.first.aggregated_needs_names).to contain_exactly('test1', 'test2')
end
context 'with ci_dag_support disabled' do
before do
stub_feature_flags(ci_dag_support: false)
end
it 'returns all processables' do
expect(with_aggregated_needs).to contain_exactly(processable)
end
it 'returns empty needs' do
expect(with_aggregated_needs.first.aggregated_needs_names).to be_nil
end
end
end
context 'without needs' do
......
......@@ -757,73 +757,19 @@ shared_examples 'Pipeline Processing Service' do
expect(builds.pending).to contain_exactly(deploy)
end
context 'when feature ci_dag_support is disabled' do
before do
stub_feature_flags(ci_dag_support: false)
end
it 'when linux:build finishes first it follows stages' do
expect(process_pipeline).to be_truthy
expect(stages).to eq(%w(pending created created))
expect(builds.pending).to contain_exactly(linux_build, mac_build)
# we follow the single path of linux
linux_build.reset.success!
expect(stages).to eq(%w(running created created))
expect(builds.success).to contain_exactly(linux_build)
expect(builds.pending).to contain_exactly(mac_build)
mac_build.reset.success!
expect(stages).to eq(%w(success pending created))
expect(builds.success).to contain_exactly(linux_build, mac_build)
expect(builds.pending).to contain_exactly(
linux_rspec, linux_rubocop, mac_rspec, mac_rubocop)
linux_rspec.reset.success!
linux_rubocop.reset.success!
mac_rspec.reset.success!
mac_rubocop.reset.success!
expect(stages).to eq(%w(success success pending))
expect(builds.success).to contain_exactly(
linux_build, linux_rspec, linux_rubocop, mac_build, mac_rspec, mac_rubocop)
expect(builds.pending).to contain_exactly(deploy)
end
end
context 'when one of the jobs is run on a failure' do
let!(:linux_notify) { create_build('linux:notify', stage: 'deploy', stage_idx: 2, when: 'on_failure', scheduling_type: :dag) }
let!(:linux_notify_on_build) { create(:ci_build_need, build: linux_notify, name: 'linux:build') }
context 'when another job in build phase fails first' do
context 'when ci_dag_support is enabled' do
it 'does skip linux:notify' do
expect(process_pipeline).to be_truthy
mac_build.reset.drop!
linux_build.reset.success!
expect(linux_notify.reset).to be_skipped
end
end
context 'when ci_dag_support is disabled' do
before do
stub_feature_flags(ci_dag_support: false)
end
it 'does run linux:notify' do
expect(process_pipeline).to be_truthy
it 'does skip linux:notify' do
expect(process_pipeline).to be_truthy
mac_build.reset.drop!
linux_build.reset.success!
mac_build.reset.drop!
linux_build.reset.success!
expect(linux_notify.reset).to be_pending
end
expect(linux_notify.reset).to be_skipped
end
end
......@@ -864,19 +810,6 @@ shared_examples 'Pipeline Processing Service' do
expect(stages).to eq(%w(success success running))
expect(builds.pending).to contain_exactly(deploy)
end
context 'when ci_dag_support is disabled' do
before do
stub_feature_flags(ci_dag_support: false)
end
it 'does run deploy_pages at the start' do
expect(process_pipeline).to be_truthy
expect(stages).to eq(%w(pending created created))
expect(builds.pending).to contain_exactly(linux_build, mac_build)
end
end
end
end
......
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