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
59a12218
Commit
59a12218
authored
Oct 01, 2020
by
David Barr
Committed by
James Lopez
Oct 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove coverage_report_view feature flag
It was enabled by default in GitLab 13.4 and no issues were seen.
parent
e07e69c1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
52 deletions
+6
-52
app/models/merge_request.rb
app/models/merge_request.rb
+0
-2
app/services/ci/pipelines/create_artifact_service.rb
app/services/ci/pipelines/create_artifact_service.rb
+0
-1
changelogs/unreleased/249811-remove-coverage-report-view-feature-flag.yml
...eased/249811-remove-coverage-report-view-feature-flag.yml
+5
-0
config/feature_flags/development/coverage_report_view.yml
config/feature_flags/development/coverage_report_view.yml
+0
-7
doc/user/project/merge_requests/test_coverage_visualization.md
...ser/project/merge_requests/test_coverage_visualization.md
+1
-28
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
spec/services/ci/pipelines/create_artifact_service_spec.rb
spec/services/ci/pipelines/create_artifact_service_spec.rb
+0
-10
No files found.
app/models/merge_request.rb
View file @
59a12218
...
...
@@ -1384,8 +1384,6 @@ class MergeRequest < ApplicationRecord
end
def
has_coverage_reports?
return
false
unless
Feature
.
enabled?
(
:coverage_report_view
,
project
,
default_enabled:
true
)
actual_head_pipeline
&
.
has_coverage_reports?
end
...
...
app/services/ci/pipelines/create_artifact_service.rb
View file @
59a12218
...
...
@@ -3,7 +3,6 @@ module Ci
module
Pipelines
class
CreateArtifactService
def
execute
(
pipeline
)
return
unless
::
Gitlab
::
Ci
::
Features
.
coverage_report_view?
(
pipeline
.
project
)
return
unless
pipeline
.
can_generate_coverage_reports?
return
if
pipeline
.
has_coverage_reports?
...
...
changelogs/unreleased/249811-remove-coverage-report-view-feature-flag.yml
0 → 100644
View file @
59a12218
---
title
:
Remove coverage_report_view feature flag
merge_request
:
43711
author
:
David Barr @davebarr
type
:
removed
config/feature_flags/development/coverage_report_view.yml
deleted
100644 → 0
View file @
e07e69c1
---
name
:
coverage_report_view
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21791
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/211410
group
:
'
group::verify
testing'
type
:
development
default_enabled
:
true
doc/user/project/merge_requests/test_coverage_visualization.md
View file @
59a12218
...
...
@@ -8,10 +8,7 @@ type: reference, howto
# Test Coverage Visualization
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3708) in GitLab 12.9.
> - [Feature flag enabled](https://gitlab.com/gitlab-org/gitlab/-/issues/211410) in GitLab 13.4.
> - It's enabled on GitLab.com.
> - It can be disabled per-project.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-code-coverage-visualization). **(CORE ONLY)**
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/249811) in GitLab 13.5.
With the help of
[
GitLab CI/CD
](
../../../ci/README.md
)
, you can collect the test
coverage information of your favorite testing or coverage-analysis tool, and visualize
...
...
@@ -151,27 +148,3 @@ coverage-jdk11:
reports
:
cobertura
:
build/cobertura.xml
```
## Enable or disable code coverage visualization
This feature comes with the
`:coverage_report_view`
feature flag enabled by
default. It is enabled on GitLab.com.
[
GitLab administrators with access to the GitLab Rails console
](
../../../administration/feature_flags.md
)
can disable it for your instance. Test coverage visualization can be enabled or disabled per-project.
To disable it:
```
ruby
# Instance-wide
Feature
.
disable
(
:coverage_report_view
)
# or by project
Feature
.
disable
(
:coverage_report_view
,
Project
.
find
(
<
project
id
>
))
```
To enable it:
```
ruby
# Instance-wide
Feature
.
enable
(
:coverage_report_view
)
# or by project
Feature
.
enable
(
:coverage_report_view
,
Project
.
find
(
<
project
id
>
))
```
lib/gitlab/ci/features.rb
View file @
59a12218
...
...
@@ -46,10 +46,6 @@ module Gitlab
Feature
.
enabled?
(
:project_transactionless_destroy
,
project
,
default_enabled:
false
)
end
def
self
.
coverage_report_view?
(
project
)
::
Feature
.
enabled?
(
:coverage_report_view
,
project
,
default_enabled:
true
)
end
def
self
.
child_of_child_pipeline_enabled?
(
project
)
::
Feature
.
enabled?
(
:ci_child_of_child_pipeline
,
project
,
default_enabled:
true
)
end
...
...
spec/services/ci/pipelines/create_artifact_service_spec.rb
View file @
59a12218
...
...
@@ -35,16 +35,6 @@ RSpec.describe ::Ci::Pipelines::CreateArtifactService do
end
end
context
'when feature is disabled'
do
it
'does not create a pipeline artifact'
do
stub_feature_flags
(
coverage_report_view:
false
)
subject
expect
(
Ci
::
PipelineArtifact
.
count
).
to
eq
(
0
)
end
end
context
'when pipeline artifact has already been created'
do
it
'do not raise an error and do not persist the same artifact twice'
do
expect
{
2
.
times
{
described_class
.
new
.
execute
(
pipeline
)
}
}.
not_to
raise_error
(
ActiveRecord
::
RecordNotUnique
)
...
...
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