Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e0796fe8
Commit
e0796fe8
authored
Apr 09, 2020
by
Lee Tickett
Committed by
Kamil Trzciński
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `ci_dag_support` feature flag
parent
52aff747
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
107 deletions
+13
-107
app/models/ci/build_dependencies.rb
app/models/ci/build_dependencies.rb
+0
-1
app/models/ci/processable.rb
app/models/ci/processable.rb
+0
-2
app/services/ci/pipeline_processing/atomic_processing_service.rb
...vices/ci/pipeline_processing/atomic_processing_service.rb
+1
-1
app/services/ci/pipeline_processing/legacy_processing_service.rb
...vices/ci/pipeline_processing/legacy_processing_service.rb
+1
-8
changelogs/unreleased/remove_ci_dag_support_feature_flag.yml
changelogs/unreleased/remove_ci_dag_support_feature_flag.yml
+5
-0
doc/ci/directed_acyclic_graph/index.md
doc/ci/directed_acyclic_graph/index.md
+1
-1
spec/models/ci/build_dependencies_spec.rb
spec/models/ci/build_dependencies_spec.rb
+0
-8
spec/models/ci/processable_spec.rb
spec/models/ci/processable_spec.rb
+0
-14
spec/services/ci/pipeline_processing/shared_processing_service.rb
...vices/ci/pipeline_processing/shared_processing_service.rb
+5
-72
No files found.
app/models/ci/build_dependencies.rb
View file @
e0796fe8
...
@@ -67,7 +67,6 @@ module Ci
...
@@ -67,7 +67,6 @@ module Ci
end
end
def
from_needs
(
scope
)
def
from_needs
(
scope
)
return
scope
unless
Feature
.
enabled?
(
:ci_dag_support
,
project
,
default_enabled:
true
)
return
scope
unless
processable
.
scheduling_type_dag?
return
scope
unless
processable
.
scheduling_type_dag?
needs_names
=
processable
.
needs
.
artifacts
.
select
(
:name
)
needs_names
=
processable
.
needs
.
artifacts
.
select
(
:name
)
...
...
app/models/ci/processable.rb
View file @
e0796fe8
...
@@ -25,8 +25,6 @@ module Ci
...
@@ -25,8 +25,6 @@ module Ci
end
end
def
self
.
select_with_aggregated_needs
(
project
)
def
self
.
select_with_aggregated_needs
(
project
)
return
all
unless
Feature
.
enabled?
(
:ci_dag_support
,
project
,
default_enabled:
true
)
aggregated_needs_names
=
Ci
::
BuildNeed
aggregated_needs_names
=
Ci
::
BuildNeed
.
scoped_build
.
scoped_build
.
select
(
"ARRAY_AGG(name)"
)
.
select
(
"ARRAY_AGG(name)"
)
...
...
app/services/ci/pipeline_processing/atomic_processing_service.rb
View file @
e0796fe8
...
@@ -93,7 +93,7 @@ module Ci
...
@@ -93,7 +93,7 @@ module Ci
end
end
def
processable_status
(
processable
)
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
# Processable uses DAG, get status of all dependent needs
@collection
.
status_for_names
(
processable
.
aggregated_needs_names
.
to_a
)
@collection
.
status_for_names
(
processable
.
aggregated_needs_names
.
to_a
)
else
else
...
...
app/services/ci/pipeline_processing/legacy_processing_service.rb
View file @
e0796fe8
...
@@ -43,8 +43,6 @@ module Ci
...
@@ -43,8 +43,6 @@ module Ci
end
end
def
process_dag_builds_without_needs
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
|
created_processables
.
scheduling_type_dag
.
without_needs
.
each
do
|
build
|
process_build
(
build
,
'success'
)
process_build
(
build
,
'success'
)
end
end
...
@@ -52,7 +50,6 @@ module Ci
...
@@ -52,7 +50,6 @@ module Ci
def
process_dag_builds_with_needs
(
trigger_build_ids
)
def
process_dag_builds_with_needs
(
trigger_build_ids
)
return
false
unless
trigger_build_ids
.
present?
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:
# we find processables that are dependent:
# 1. because of current dependency,
# 1. because of current dependency,
...
@@ -110,11 +107,7 @@ module Ci
...
@@ -110,11 +107,7 @@ module Ci
end
end
def
created_stage_scheduled_processables
def
created_stage_scheduled_processables
if
Feature
.
enabled?
(
:ci_dag_support
,
project
,
default_enabled:
true
)
created_processables
.
scheduling_type_stage
created_processables
.
scheduling_type_stage
else
created_processables
end
end
end
def
created_processables
def
created_processables
...
...
changelogs/unreleased/remove_ci_dag_support_feature_flag.yml
0 → 100644
View file @
e0796fe8
---
title
:
Remove `ci_dag_support` feature flag
merge_request
:
28863
author
:
Lee Tickett
type
:
added
doc/ci/directed_acyclic_graph/index.md
View file @
e0796fe8
...
@@ -4,7 +4,7 @@ type: reference
...
@@ -4,7 +4,7 @@ type: reference
# Directed Acyclic Graph
# 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
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
used in the context of a CI/CD pipeline to build relationships between jobs such that
...
...
spec/models/ci/build_dependencies_spec.rb
View file @
e0796fe8
...
@@ -96,14 +96,6 @@ describe Ci::BuildDependencies do
...
@@ -96,14 +96,6 @@ describe Ci::BuildDependencies do
end
end
it
{
is_expected
.
to
contain_exactly
(
build
,
rspec_test
,
staging
)
}
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
end
context
'when need artifacts are defined'
do
context
'when need artifacts are defined'
do
...
...
spec/models/ci/processable_spec.rb
View file @
e0796fe8
...
@@ -25,20 +25,6 @@ describe Ci::Processable do
...
@@ -25,20 +25,6 @@ describe Ci::Processable do
it
'returns all needs'
do
it
'returns all needs'
do
expect
(
with_aggregated_needs
.
first
.
aggregated_needs_names
).
to
contain_exactly
(
'test1'
,
'test2'
)
expect
(
with_aggregated_needs
.
first
.
aggregated_needs_names
).
to
contain_exactly
(
'test1'
,
'test2'
)
end
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
end
context
'without needs'
do
context
'without needs'
do
...
...
spec/services/ci/pipeline_processing/shared_processing_service.rb
View file @
e0796fe8
...
@@ -757,73 +757,19 @@ shared_examples 'Pipeline Processing Service' do
...
@@ -757,73 +757,19 @@ shared_examples 'Pipeline Processing Service' do
expect
(
builds
.
pending
).
to
contain_exactly
(
deploy
)
expect
(
builds
.
pending
).
to
contain_exactly
(
deploy
)
end
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
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
)
{
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'
)
}
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 another job in build phase fails first'
do
context
'when ci_dag_support is enabled'
do
it
'does skip linux:notify'
do
it
'does skip linux:notify'
do
expect
(
process_pipeline
).
to
be_truthy
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
mac_build
.
reset
.
drop!
mac_build
.
reset
.
drop!
linux_build
.
reset
.
success!
linux_build
.
reset
.
success!
expect
(
linux_notify
.
reset
).
to
be_pending
expect
(
linux_notify
.
reset
).
to
be_skipped
end
end
end
end
end
...
@@ -864,19 +810,6 @@ shared_examples 'Pipeline Processing Service' do
...
@@ -864,19 +810,6 @@ shared_examples 'Pipeline Processing Service' do
expect
(
stages
).
to
eq
(
%w(success success running)
)
expect
(
stages
).
to
eq
(
%w(success success running)
)
expect
(
builds
.
pending
).
to
contain_exactly
(
deploy
)
expect
(
builds
.
pending
).
to
contain_exactly
(
deploy
)
end
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
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment