Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/services/ci/create_downstream_pipeline_service.rb
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/services/ci/create_downstream_pipeline_service.rb')
-rw-r--r--app/services/ci/create_downstream_pipeline_service.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/services/ci/create_downstream_pipeline_service.rb b/app/services/ci/create_downstream_pipeline_service.rb
index a2e53cbf9b8..034bab93108 100644
--- a/app/services/ci/create_downstream_pipeline_service.rb
+++ b/app/services/ci/create_downstream_pipeline_service.rb
@@ -120,15 +120,13 @@ module Ci
def has_cyclic_dependency?
return false if @bridge.triggers_child_pipeline?
- if Feature.enabled?(:ci_drop_cyclical_triggered_pipelines, @bridge.project, default_enabled: :yaml)
- pipeline_checksums = @bridge.pipeline.self_and_upstreams.filter_map do |pipeline|
- config_checksum(pipeline) unless pipeline.child?
- end
-
- # To avoid false positives we allow 1 cycle in the ancestry and
- # fail when 2 cycles are detected: A -> B -> A -> B -> A
- pipeline_checksums.tally.any? { |_checksum, occurrences| occurrences > 2 }
+ pipeline_checksums = @bridge.pipeline.self_and_upstreams.filter_map do |pipeline|
+ config_checksum(pipeline) unless pipeline.child?
end
+
+ # To avoid false positives we allow 1 cycle in the ancestry and
+ # fail when 2 cycles are detected: A -> B -> A -> B -> A
+ pipeline_checksums.tally.any? { |_checksum, occurrences| occurrences > 2 }
end
def has_max_descendants_depth?