Skip to content
Snippets Groups Projects
Commit 7c1b30b2 authored by Laura Montemayor's avatar Laura Montemayor :zero:
Browse files

Removes ci_value_change_for_processable_and_rules_entry ff

Changelog: changed
parent adf99b53
No related branches found
No related tags found
1 merge request!91776Removes ci_value_change_for_processable_and_rules_entry ff
---
name: ci_value_change_for_processable_and_rules_entry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90238
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/365876
milestone: '15.2'
type: development
group: group::pipeline authoring
default_enabled: false
......@@ -86,16 +86,10 @@ def compose!(deps = nil)
@entries.delete(:except) unless except_defined? # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
unless ::Feature.enabled?(:ci_value_change_for_processable_and_rules_entry)
validate_against_warnings unless has_workflow_rules
end
yield if block_given?
end
if ::Feature.enabled?(:ci_value_change_for_processable_and_rules_entry)
validate_against_warnings unless has_workflow_rules
end
validate_against_warnings unless has_workflow_rules
end
def validate_against_warnings
......
......@@ -13,12 +13,7 @@ class Rules < ::Gitlab::Config::Entry::ComposableArray
end
def value
if ::Feature.enabled?(:ci_value_change_for_processable_and_rules_entry)
# `flatten` is needed to make it work with nested `!reference`
[super].flatten
else
[@config].flatten
end
[super].flatten
end
def composable_class
......
......@@ -278,13 +278,8 @@ def self.name
context 'when workflow rules is not used' do
let(:workflow) { double('workflow', 'has_rules?' => false) }
let(:ci_value_change_for_processable_and_rules_entry) { true }
before do
stub_feature_flags(
ci_value_change_for_processable_and_rules_entry: ci_value_change_for_processable_and_rules_entry
)
entry.compose!(deps)
end
......@@ -308,14 +303,6 @@ def self.name
it 'raises a warning' do
expect(entry.warnings).to contain_exactly(/may allow multiple pipelines/)
end
context 'when the FF ci_value_change_for_processable_and_rules_entry is disabled' do
let(:ci_value_change_for_processable_and_rules_entry) { false }
it 'raises a warning' do
expect(entry.warnings).to contain_exactly(/may allow multiple pipelines/)
end
end
end
context 'and its value is `never`' do
......
# frozen_string_literal: true
require 'fast_spec_helper'
require 'support/helpers/stubbed_feature'
require 'support/helpers/stub_feature_flags'
require_dependency 'active_model'
RSpec.describe Gitlab::Ci::Config::Entry::Rules do
include StubFeatureFlags
let(:factory) do
Gitlab::Config::Entry::Factory.new(described_class)
.metadata(metadata)
......@@ -106,14 +102,6 @@
end
it { is_expected.to eq([]) }
context 'when the FF ci_value_change_for_processable_and_rules_entry is disabled' do
before do
stub_feature_flags(ci_value_change_for_processable_and_rules_entry: false)
end
it { is_expected.to eq([config]) }
end
end
context 'with nested rules' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment