Commit d0ee635d authored by Maxime Orefice's avatar Maxime Orefice Committed by Douglas Barbosa Alexandre

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

parent 448e0ab6
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
helpPath: this.codequalityHelpPath, helpPath: this.codequalityHelpPath,
}); });
this.fetchReports(this.glFeatures.codequalityBackendComparison); this.fetchReports();
}, },
methods: { methods: {
...mapActions(['fetchReports', 'setPaths']), ...mapActions(['fetchReports', 'setPaths']),
......
...@@ -37,7 +37,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -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(:default_merge_ref_for_diffs, @project, default_enabled: :yaml)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project) 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(: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(:local_file_reviews, default_enabled: :yaml)
push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml) push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml) push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
......
...@@ -37,7 +37,7 @@ class MergeRequest < ApplicationRecord ...@@ -37,7 +37,7 @@ class MergeRequest < ApplicationRecord
SORTING_PREFERENCE_FIELD = :merge_requests_sort SORTING_PREFERENCE_FIELD = :merge_requests_sort
ALLOWED_TO_USE_MERGE_BASE_PIPELINE_FOR_COMPARISON = { ALLOWED_TO_USE_MERGE_BASE_PIPELINE_FOR_COMPARISON = {
'Ci::CompareCodequalityReportsService' => ->(project) { ::Gitlab::Ci::Features.display_codequality_backend_comparison?(project) } 'Ci::CompareCodequalityReportsService' => ->(project) { true }
}.freeze }.freeze
belongs_to :target_project, class_name: "Project" belongs_to :target_project, class_name: "Project"
...@@ -1564,8 +1564,6 @@ class MergeRequest < ApplicationRecord ...@@ -1564,8 +1564,6 @@ class MergeRequest < ApplicationRecord
end end
def has_codequality_reports? def has_codequality_reports?
return false unless ::Gitlab::Ci::Features.display_codequality_backend_comparison?(project)
actual_head_pipeline&.has_reports?(Ci::JobArtifact.codequality_reports) actual_head_pipeline&.has_reports?(Ci::JobArtifact.codequality_reports)
end 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: ...@@ -571,3 +571,8 @@ plugins:
enabled: true enabled: true
channel: rubocop-0-67 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 ...@@ -56,10 +56,6 @@ module Gitlab
::Feature.enabled?(:codequality_mr_diff, project, default_enabled: false) ::Feature.enabled?(:codequality_mr_diff, project, default_enabled: false)
end end
def self.display_codequality_backend_comparison?(project)
::Feature.enabled?(:codequality_backend_comparison, project, default_enabled: :yaml)
end
def self.multiple_cache_per_job? def self.multiple_cache_per_job?
::Feature.enabled?(:multiple_cache_per_job, default_enabled: :yaml) ::Feature.enabled?(:multiple_cache_per_job, default_enabled: :yaml)
end end
......
...@@ -2053,14 +2053,6 @@ RSpec.describe MergeRequest, factory_default: :keep do ...@@ -2053,14 +2053,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
let(:merge_request) { create(:merge_request, :with_codequality_reports, source_project: project) } let(:merge_request) { create(:merge_request, :with_codequality_reports, source_project: project) }
it { is_expected.to be_truthy } 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 end
context 'when head pipeline does not have a codequality report' do context 'when head pipeline does not have a codequality report' do
...@@ -3887,17 +3879,7 @@ RSpec.describe MergeRequest, factory_default: :keep do ...@@ -3887,17 +3879,7 @@ RSpec.describe MergeRequest, factory_default: :keep do
context 'when service class is Ci::CompareCodequalityReportsService' do context 'when service class is Ci::CompareCodequalityReportsService' do
let(:service_class) { 'Ci::CompareCodequalityReportsService' } let(:service_class) { 'Ci::CompareCodequalityReportsService' }
context 'when feature flag is enabled' do it { is_expected.to be_truthy }
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
end end
context 'when service class is different' do 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