Skip to content
Snippets Groups Projects
Commit ccdac7fc authored by Furkan Ayhan's avatar Furkan Ayhan :two:
Browse files

Enable and remove the FF ci_rule_exists_extension_optimization

It's already enabled on GitLab.com since 2024-03-05.

Changelog: performance
parent 119f5a3b
No related branches found
No related tags found
2 merge requests!148930Uses billable_member util in PreviewBillableUserChangeService,!148682Enable and remove the FF ci_rule_exists_extension_optimization
---
name: ci_rule_exists_extension_optimization
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/227632
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143056
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17531
milestone: '16.9'
group: group::pipeline authoring
type: gitlab_com_derisk
default_enabled: false
......@@ -16,10 +16,6 @@ def initialize(globs)
end
def satisfied_by?(_pipeline, context)
if ::Feature.disabled?(:ci_rule_exists_extension_optimization, context.project, type: :gitlab_com_derisk)
return legacy_satisfied_by?(context)
end
paths = worktree_paths(context)
exact_globs, extension_globs, pattern_globs = separate_globs(context)
......@@ -30,18 +26,6 @@ def satisfied_by?(_pipeline, context)
private
def legacy_satisfied_by?(context)
paths = worktree_paths(context)
exact_globs, pattern_globs = legacy_separate_globs(context)
exact_matches?(paths, exact_globs) || pattern_matches?(paths, pattern_globs)
end
def legacy_separate_globs(context)
expanded_globs = expand_globs(context)
expanded_globs.partition(&method(:exact_glob?))
end
def separate_globs(context)
expanded_globs = expand_globs(context)
......
......@@ -11,16 +11,6 @@
let(:project) { create(:project, :custom_repo, files: files) }
end
context 'with feature flag `ci_rule_exists_extension_optimization` disabled' do
before do
stub_feature_flags(ci_rule_exists_extension_optimization: false)
end
it_behaves_like 'a glob matching rule' do
let(:project) { create(:project, :custom_repo, files: files) }
end
end
context 'when the rules:exists has a variable' do
let_it_be(:project) { create(:project, :custom_repo, files: { 'helm/helm_file.txt' => '' }) }
......
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