Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d0ee635d
Commit
d0ee635d
authored
Apr 15, 2021
by
Maxime Orefice
Committed by
Douglas Barbosa Alexandre
Apr 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove codequality_backend_comparison feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]
parent
448e0ab6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
36 deletions
+13
-36
app/assets/javascripts/reports/codequality_report/grouped_codequality_reports_app.vue
...ts/codequality_report/grouped_codequality_reports_app.vue
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
app/models/merge_request.rb
app/models/merge_request.rb
+1
-3
changelogs/unreleased/mo-remove-codequality-backend-ff.yml
changelogs/unreleased/mo-remove-codequality-backend-ff.yml
+5
-0
config/feature_flags/development/codequality_backend_comparison.yml
...ture_flags/development/codequality_backend_comparison.yml
+0
-8
doc/user/project/merge_requests/code_quality.md
doc/user/project/merge_requests/code_quality.md
+5
-0
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-19
No files found.
app/assets/javascripts/reports/codequality_report/grouped_codequality_reports_app.vue
View file @
d0ee635d
...
@@ -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
'
]),
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
d0ee635d
...
@@ -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
)
...
...
app/models/merge_request.rb
View file @
d0ee635d
...
@@ -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
...
...
changelogs/unreleased/mo-remove-codequality-backend-ff.yml
0 → 100644
View file @
d0ee635d
---
title
:
Remove codequality_backend_comparison feature flag
merge_request
:
59320
author
:
type
:
added
config/feature_flags/development/codequality_backend_comparison.yml
deleted
100644 → 0
View file @
448e0ab6
---
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
doc/user/project/merge_requests/code_quality.md
View file @
d0ee635d
...
@@ -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`
.
lib/gitlab/ci/features.rb
View file @
d0ee635d
...
@@ -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
...
...
spec/models/merge_request_spec.rb
View file @
d0ee635d
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment