From 85151ff6f65fcb3076b554c563ccc2fa458a9ccb Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Thu, 7 Dec 2017 23:17:46 +0900 Subject: [PATCH] Change feature flag to ci_disable_validates_dependencies to enable it as default --- app/models/ci/build.rb | 2 +- spec/models/ci/build_spec.rb | 2 +- spec/services/ci/register_job_service_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index fbda0962a91..85960f1b6bb 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -143,7 +143,7 @@ module Ci end before_transition any => [:running] do |build| - build.validates_dependencies! if Feature.enabled?('ci_validates_dependencies') + build.validates_dependencies! unless Feature.enabled?('ci_disable_validates_dependencies') end end diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 96d9fba2a2d..3440ce7f1e8 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1870,7 +1870,7 @@ describe Ci::Build do describe 'state transition: any => [:running]' do before do - stub_feature_flags(ci_validates_dependencies: true) + stub_feature_flags(ci_disable_validates_dependencies: true) end let(:build) { create(:ci_build, :pending, pipeline: pipeline, stage_idx: 1, options: options) } diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb index 19e78faa591..16218b78fb8 100644 --- a/spec/services/ci/register_job_service_spec.rb +++ b/spec/services/ci/register_job_service_spec.rb @@ -278,7 +278,7 @@ module Ci context 'when "dependencies" keyword is specified' do before do - stub_feature_flags(ci_validates_dependencies: true) + stub_feature_flags(ci_disable_validates_dependencies: false) end let!(:pre_stage_job) { create(:ci_build, :success, pipeline: pipeline, name: job_name, stage_idx: 0) }