Commit eefe6ffc authored by James Fargher's avatar James Fargher

Merge branch 'mo-remove-tag-limit-feature-flag' into 'master'

Remove ci_build_tags_limit feature flag

See merge request gitlab-org/gitlab!74813
parents 95709f37 39952697
---
name: ci_build_tags_limit
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68380
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/338929
milestone: '14.2'
type: development
group: group::pipeline execution
default_enabled: true
......@@ -16,8 +16,6 @@ module Gitlab
validates :config, array_of_strings: true
validate do
next unless ::Feature.enabled?(:ci_build_tags_limit, default_enabled: :yaml)
if config.is_a?(Array) && config.size >= TAGS_LIMIT
errors.add(:config, _("must be less than the limit of %{tag_limit} tags") % { tag_limit: TAGS_LIMIT })
end
......
......@@ -36,25 +36,9 @@ RSpec.describe Gitlab::Ci::Config::Entry::Tags do
context 'when tags limit is reached' do
let(:config) { Array.new(50) {|i| "tag-#{i}" } }
context 'when ci_build_tags_limit is enabled' do
before do
stub_feature_flags(ci_build_tags_limit: true)
end
it 'reports error' do
expect(entry.errors)
.to include "tags config must be less than the limit of #{described_class::TAGS_LIMIT} tags"
end
end
context 'when ci_build_tags_limit is disabled' do
before do
stub_feature_flags(ci_build_tags_limit: false)
end
it 'does not report an error' do
expect(entry.errors).to be_empty
end
it 'reports error' do
expect(entry.errors)
.to include "tags config must be less than the limit of #{described_class::TAGS_LIMIT} tags"
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment