Commit 6e41432d authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'mo-remove-codequality-backend-ff' into 'master'

Remove codequality_backend_comparison feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!59320
parents 21beb9ce d0ee635d
......@@ -62,7 +62,7 @@ export default {
helpPath: this.codequalityHelpPath,
});
this.fetchReports(this.glFeatures.codequalityBackendComparison);
this.fetchReports();
},
methods: {
...mapActions(['fetchReports', 'setPaths']),
......
......@@ -37,7 +37,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:default_merge_ref_for_diffs, @project, default_enabled: :yaml)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project)
push_frontend_feature_flag(:diffs_gradual_load, @project, default_enabled: true)
push_frontend_feature_flag(:codequality_backend_comparison, @project, default_enabled: :yaml)
push_frontend_feature_flag(:local_file_reviews, default_enabled: :yaml)
push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
......
......@@ -37,7 +37,7 @@ class MergeRequest < ApplicationRecord
SORTING_PREFERENCE_FIELD = :merge_requests_sort
ALLOWED_TO_USE_MERGE_BASE_PIPELINE_FOR_COMPARISON = {
'Ci::CompareCodequalityReportsService' => ->(project) { ::Gitlab::Ci::Features.display_codequality_backend_comparison?(project) }
'Ci::CompareCodequalityReportsService' => ->(project) { true }
}.freeze
belongs_to :target_project, class_name: "Project"
......@@ -1564,8 +1564,6 @@ class MergeRequest < ApplicationRecord
end
def has_codequality_reports?
return false unless ::Gitlab::Ci::Features.display_codequality_backend_comparison?(project)
actual_head_pipeline&.has_reports?(Ci::JobArtifact.codequality_reports)
end
......
---
title: Remove codequality_backend_comparison feature flag
merge_request: 59320
author:
type: added
---
name: codequality_backend_comparison
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53068
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/300796
milestone: '13.9'
type: development
group: group::testing
default_enabled: true
......@@ -571,3 +571,8 @@ plugins:
enabled: true
channel: rubocop-0-67
```
### No Code Quality appears on merge requests when using custom tool
If your merge requests do not show any code quality changes when using a custom tool,
ensure that the line property is an `integer`.
......@@ -56,10 +56,6 @@ module Gitlab
::Feature.enabled?(:codequality_mr_diff, project, default_enabled: false)
end
def self.display_codequality_backend_comparison?(project)
::Feature.enabled?(:codequality_backend_comparison, project, default_enabled: :yaml)
end
def self.multiple_cache_per_job?
::Feature.enabled?(:multiple_cache_per_job, default_enabled: :yaml)
end
......
......@@ -2053,14 +2053,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
let(:merge_request) { create(:merge_request, :with_codequality_reports, source_project: project) }
it { is_expected.to be_truthy }
context 'when feature flag is disabled' do
before do
stub_feature_flags(codequality_backend_comparison: false)
end
it { is_expected.to be_falsey }
end
end
context 'when head pipeline does not have a codequality report' do
......@@ -3887,17 +3879,7 @@ RSpec.describe MergeRequest, factory_default: :keep do
context 'when service class is Ci::CompareCodequalityReportsService' do
let(:service_class) { 'Ci::CompareCodequalityReportsService' }
context 'when feature flag is enabled' do
it { is_expected.to be_truthy }
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(codequality_backend_comparison: false)
end
it { is_expected.to be_falsey }
end
it { is_expected.to be_truthy }
end
context 'when service class is different' 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