Commit 59a12218 authored by David Barr's avatar David Barr Committed by James Lopez

Remove coverage_report_view feature flag

It was enabled by default in GitLab 13.4 and no issues were seen.
parent e07e69c1
......@@ -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
......
......@@ -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?
......
---
title: Remove coverage_report_view feature flag
merge_request: 43711
author: David Barr @davebarr
type: removed
---
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
......@@ -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>))
```
......@@ -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
......
......@@ -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)
......
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