From 1da7d0ec49aa30d2b39d8abc7867ded7b18defb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Wed, 19 Dec 2018 11:16:08 +0100 Subject: [PATCH] Removed pipeline_ci_sources_only feature flag Removing the pipeline_ci_sources_only feature flag introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23353 --- app/models/project.rb | 2 +- spec/models/project_spec.rb | 21 +++------------------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 67262ecce85..0711cd4aabd 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -256,7 +256,7 @@ class Project < ActiveRecord::Base # other pipelines, like webide ones, that we won't retrieve # if we use this relation. has_many :ci_pipelines, - -> { Feature.enabled?(:pipeline_ci_sources_only, default_enabled: true) ? ci_sources : all }, + -> { ci_sources }, class_name: 'Ci::Pipeline', inverse_of: :project has_many :stages, class_name: 'Ci::Stage', inverse_of: :project diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 5e63f14b720..3ba00e2f25d 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -145,25 +145,10 @@ describe Project do end describe 'ci_pipelines association' do - context 'when feature flag pipeline_ci_sources_only is enabled' do - it 'returns only pipelines from ci_sources' do - stub_feature_flags(pipeline_ci_sources_only: true) + it 'returns only pipelines from ci_sources' do + expect(Ci::Pipeline).to receive(:ci_sources).and_call_original - expect(Ci::Pipeline).to receive(:ci_sources).and_call_original - - subject.ci_pipelines - end - end - - context 'when feature flag pipeline_ci_sources_only is disabled' do - it 'returns all pipelines' do - stub_feature_flags(pipeline_ci_sources_only: false) - - expect(Ci::Pipeline).not_to receive(:ci_sources).and_call_original - expect(Ci::Pipeline).to receive(:all).and_call_original.at_least(:once) - - subject.ci_pipelines - end + subject.ci_pipelines end end end