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
7c363c4e
Commit
7c363c4e
authored
Oct 16, 2020
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF ci_child_of_child_pipeline
This also removes the docs of it
parent
fff3b3aa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
69 deletions
+7
-69
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+3
-10
app/services/ci/create_downstream_pipeline_service.rb
app/services/ci/create_downstream_pipeline_service.rb
+3
-10
config/feature_flags/development/ci_child_of_child_pipeline.yml
.../feature_flags/development/ci_child_of_child_pipeline.yml
+0
-7
doc/ci/parent_child_pipelines.md
doc/ci/parent_child_pipelines.md
+1
-24
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
spec/services/ci/create_downstream_pipeline_service_spec.rb
spec/services/ci/create_downstream_pipeline_service_spec.rb
+0
-14
No files found.
app/models/ci/pipeline.rb
View file @
7c363c4e
...
@@ -829,16 +829,9 @@ module Ci
...
@@ -829,16 +829,9 @@ module Ci
end
end
def
same_family_pipeline_ids
def
same_family_pipeline_ids
if
::
Gitlab
::
Ci
::
Features
.
child_of_child_pipeline_enabled?
(
project
)
::
Gitlab
::
Ci
::
PipelineObjectHierarchy
.
new
(
::
Gitlab
::
Ci
::
PipelineObjectHierarchy
.
new
(
base_and_ancestors
(
same_project:
true
),
options:
{
same_project:
true
}
base_and_ancestors
(
same_project:
true
),
options:
{
same_project:
true
}
).
base_and_descendants
.
select
(
:id
)
).
base_and_descendants
.
select
(
:id
)
else
# If pipeline is a child of another pipeline, include the parent
# and the siblings, otherwise return only itself and children.
parent
=
parent_pipeline
||
self
[
parent
.
id
]
+
parent
.
child_pipelines
.
pluck
(
:id
)
end
end
end
def
build_with_artifacts_in_self_and_descendants
(
name
)
def
build_with_artifacts_in_self_and_descendants
(
name
)
...
...
app/services/ci/create_downstream_pipeline_service.rb
View file @
7c363c4e
...
@@ -77,16 +77,9 @@ module Ci
...
@@ -77,16 +77,9 @@ module Ci
# TODO: Remove this condition if favour of model validation
# TODO: Remove this condition if favour of model validation
# https://gitlab.com/gitlab-org/gitlab/issues/38338
# https://gitlab.com/gitlab-org/gitlab/issues/38338
if
::
Gitlab
::
Ci
::
Features
.
child_of_child_pipeline_enabled?
(
project
)
if
has_max_descendants_depth?
if
has_max_descendants_depth?
@bridge
.
drop!
(
:reached_max_descendant_pipelines_depth
)
@bridge
.
drop!
(
:reached_max_descendant_pipelines_depth
)
return
false
return
false
end
else
if
@bridge
.
triggers_child_pipeline?
&&
@bridge
.
pipeline
.
parent_pipeline
.
present?
@bridge
.
drop!
(
:bridge_pipeline_is_child_pipeline
)
return
false
end
end
end
unless
can_create_downstream_pipeline?
(
target_ref
)
unless
can_create_downstream_pipeline?
(
target_ref
)
...
...
config/feature_flags/development/ci_child_of_child_pipeline.yml
deleted
100644 → 0
View file @
fff3b3aa
---
name
:
ci_child_of_child_pipeline
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41102
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/243747
group
:
group::continuous integration
type
:
development
default_enabled
:
true
doc/ci/parent_child_pipelines.md
View file @
7c363c4e
...
@@ -164,36 +164,13 @@ This is [resolved in GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues
...
@@ -164,36 +164,13 @@ This is [resolved in GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues
## Nested child pipelines
## Nested child pipelines
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29651) in GitLab 13.4.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29651) in GitLab 13.4.
> - It's [deployed behind a feature flag](../user/feature_flags.md), enabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/243747) in GitLab 13.5.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-nested-child-pipelines). **(CORE ONLY)**
Parent and child pipelines were introduced with a maximum depth of one level of child
Parent and child pipelines were introduced with a maximum depth of one level of child
pipelines, which was later increased to two. A parent pipeline can trigger many child
pipelines, which was later increased to two. A parent pipeline can trigger many child
pipelines, and these child pipelines can trigger their own child pipelines. It's not
pipelines, and these child pipelines can trigger their own child pipelines. It's not
possible to trigger another level of child pipelines.
possible to trigger another level of child pipelines.
### Enable or disable nested child pipelines **(CORE ONLY)**
Nested child pipelines with a depth of two are under development but ready for
production use. This feature is deployed behind a feature flag that is
**enabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../administration/feature_flags.md
)
can opt to disable it.
To enable it:
```
ruby
Feature
.
enable
(
:ci_child_of_child_pipeline
)
```
To disable it:
```
ruby
Feature
.
disable
(
:ci_child_of_child_pipeline
)
```
## Pass variables to a child pipeline
## Pass variables to a child pipeline
You can
[
pass variables to a downstream pipeline
](
multi_project_pipelines.md#passing-variables-to-a-downstream-pipeline
)
.
You can
[
pass variables to a downstream pipeline
](
multi_project_pipelines.md#passing-variables-to-a-downstream-pipeline
)
.
lib/gitlab/ci/features.rb
View file @
7c363c4e
...
@@ -46,10 +46,6 @@ module Gitlab
...
@@ -46,10 +46,6 @@ module Gitlab
Feature
.
enabled?
(
:project_transactionless_destroy
,
project
,
default_enabled:
false
)
Feature
.
enabled?
(
:project_transactionless_destroy
,
project
,
default_enabled:
false
)
end
end
def
self
.
child_of_child_pipeline_enabled?
(
project
)
::
Feature
.
enabled?
(
:ci_child_of_child_pipeline
,
project
,
default_enabled:
true
)
end
def
self
.
trace_overwrite?
def
self
.
trace_overwrite?
::
Feature
.
enabled?
(
:ci_trace_overwrite
,
type: :ops
,
default_enabled:
false
)
::
Feature
.
enabled?
(
:ci_trace_overwrite
,
type: :ops
,
default_enabled:
false
)
end
end
...
...
spec/services/ci/create_downstream_pipeline_service_spec.rb
View file @
7c363c4e
...
@@ -325,20 +325,6 @@ RSpec.describe Ci::CreateDownstreamPipelineService, '#execute' do
...
@@ -325,20 +325,6 @@ RSpec.describe Ci::CreateDownstreamPipelineService, '#execute' do
expect
(
bridge
.
reload
).
to
be_success
expect
(
bridge
.
reload
).
to
be_success
end
end
context
'when FF ci_child_of_child_pipeline is disabled'
do
before
do
stub_feature_flags
(
ci_child_of_child_pipeline:
false
)
end
it
'does not create a further child pipeline'
do
expect
{
service
.
execute
(
bridge
)
}
.
not_to
change
{
Ci
::
Pipeline
.
count
}
expect
(
bridge
.
reload
).
to
be_failed
expect
(
bridge
.
failure_reason
).
to
eq
'bridge_pipeline_is_child_pipeline'
end
end
end
end
context
'when upstream pipeline has a parent pipeline, which has a parent pipeline'
do
context
'when upstream pipeline has a parent pipeline, which has a parent pipeline'
do
...
...
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