Commit c4b4bf89 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'remove-metrics-merge-base-feature-flag' into 'master'

Remove generic metrics comparison feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62335
parents c27d7b6d d7c47fb1
......@@ -37,7 +37,7 @@ class MergeRequest < ApplicationRecord
SORTING_PREFERENCE_FIELD = :merge_requests_sort
ALLOWED_TO_USE_MERGE_BASE_PIPELINE_FOR_COMPARISON = {
'Ci::CompareMetricsReportsService' => ->(project) { ::Gitlab::Ci::Features.merge_base_pipeline_for_metrics_comparison?(project) },
'Ci::CompareMetricsReportsService' => ->(project) { true },
'Ci::CompareCodequalityReportsService' => ->(project) { true }
}.freeze
......
---
name: merge_base_pipeline_for_metrics_comparison
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61282
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330809
milestone: '13.12'
type: development
group: group::testing
default_enabled: false
......@@ -18,10 +18,6 @@ module Gitlab
Feature.enabled?(:ci_pipeline_status_omit_commit_sha_in_cache_key, project, default_enabled: true)
end
def self.merge_base_pipeline_for_metrics_comparison?(project)
Feature.enabled?(:merge_base_pipeline_for_metrics_comparison, project, default_enabled: :yaml)
end
# NOTE: The feature flag `disallow_to_create_merge_request_pipelines_in_target_project`
# is a safe switch to disable the feature for a particular project when something went wrong,
# therefore it's not supposed to be enabled by default.
......
......@@ -3912,14 +3912,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
let(:service_class) { 'Ci::CompareMetricsReportsService' }
it { is_expected.to be_truthy }
context 'with the metrics report flag disabled' do
before do
stub_feature_flags(merge_base_pipeline_for_metrics_comparison: false)
end
it { is_expected.to be_falsey }
end
end
context 'when service class is Ci::CompareCodequalityReportsService' do
......
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