Commit 4282739a authored by Nathan Friend's avatar Nathan Friend

Merge branch '251214-remove-release-evidence-collection-ff' into 'master'

Remove release_evidence_collection feature flag

See merge request gitlab-org/gitlab!44234
parents 73af9bed 587413d2
......@@ -52,9 +52,6 @@ export default {
milestones() {
return this.release.milestones || [];
},
shouldShowEvidence() {
return this.glFeatures.releaseEvidenceCollection;
},
shouldRenderAssets() {
return Boolean(
this.assets.links.length || (this.assets.sources && this.assets.sources.length),
......@@ -98,7 +95,7 @@ export default {
</div>
<release-block-assets v-if="shouldRenderAssets" :assets="assets" />
<evidence-block v-if="hasEvidence && shouldShowEvidence" :release="release" />
<evidence-block v-if="hasEvidence" :release="release" />
<div ref="gfm-content" class="card-text gl-mt-3">
<div class="md" v-html="release.descriptionHtml"></div>
......
......@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :release, only: %i[edit show update downloads]
before_action :authorize_read_release!
before_action do
push_frontend_feature_flag(:release_evidence_collection, project, default_enabled: true)
push_frontend_feature_flag(:graphql_release_data, project, default_enabled: true)
push_frontend_feature_flag(:graphql_milestone_stats, project, default_enabled: true)
push_frontend_feature_flag(:graphql_releases_page, project, default_enabled: true)
......
---
title: Remove release_evidence_collection feature flag
merge_request: 44234
author: David Barr @davebarr
type: removed
---
name: release_evidence_collection
introduced_by_url:
rollout_issue_url:
group: group::release management
type: development
default_enabled: true
......@@ -79,10 +79,10 @@ To enable a feature, run:
Feature.enable(:<feature flag>)
```
Example, to enable Evidence Collection:
Example, to enable a fictional feature flag named `my_awesome_feature`:
```ruby
Feature.enable(:release_evidence_collection)
Feature.enable(:my_awesome_feature)
```
To disable a feature, run:
......@@ -91,10 +91,10 @@ To disable a feature, run:
Feature.disable(:<feature flag>)
```
Example, to disable Evidence Collection:
Example, to disable a fictional feature flag named `my_awesome_feature`:
```ruby
Feature.disable(:release_evidence_collection)
Feature.disable(:my_awesome_feature)
```
Some feature flags can be enabled or disabled on a per project basis:
......@@ -112,18 +112,18 @@ Feature.enable(:product_analytics, Project.find(1234))
`Feature.enable` and `Feature.disable` always return `nil`, this is not an indication that the command failed:
```ruby
irb(main):001:0> Feature.enable(:release_evidence_collection)
irb(main):001:0> Feature.enable(:my_awesome_feature)
=> nil
```
To check if a flag is enabled or disabled you can use `Feature.enabled?` or `Feature.disabled?`:
To check if a flag is enabled or disabled you can use `Feature.enabled?` or `Feature.disabled?`. For example, for a fictional feature flag named `my_awesome_feature`:
```ruby
Feature.enable(:release_evidence_collection)
Feature.enable(:my_awesome_feature)
=> nil
Feature.enabled?(:release_evidence_collection)
Feature.enabled?(:my_awesome_feature)
=> true
Feature.disabled?(:release_evidence_collection)
Feature.disabled?(:my_awesome_feature)
=> false
```
......
......@@ -449,21 +449,6 @@ In the API:
- If you do not specify a `released_at` date, release evidence is collected on the
date the release is created.
### Disable release evidence display **(CORE ONLY)**
The `:release_evidence_collection` feature flag is enabled by default in GitLab
self-managed instances. To turn it off, ask a GitLab administrator with Rails console
access to run the following command:
```ruby
Feature.disable(:release_evidence_collection)
```
NOTE: **Note:**
Release evidence is collected regardless of this feature flag,
which only enables or disables the display of the data on the
Releases page.
## GitLab Releaser
> [Introduced](https://gitlab.com/gitlab-org/gitlab-releaser/-/merge_requests/6) in GitLab 12.10.
......
......@@ -131,18 +131,14 @@ describe('Release block', () => {
});
describe('evidence block', () => {
it('renders the evidence block when the evidence is available and the feature flag is true', () =>
factory(release, { releaseEvidenceCollection: true }).then(() =>
expect(wrapper.find(EvidenceBlock).exists()).toBe(true),
));
it('does not render the evidence block when the evidence is available but the feature flag is false', () =>
factory(release, { releaseEvidenceCollection: true }).then(() =>
expect(wrapper.find(EvidenceBlock).exists()).toBe(true),
));
it('renders the evidence block when the evidence is available', () => {
return factory(release).then(() => {
expect(wrapper.find(EvidenceBlock).exists()).toBe(true);
});
});
it('does not render the evidence block when there is no evidence', () => {
release.evidenceSha = null;
release.evidences = [];
return factory(release).then(() => {
expect(wrapper.find(EvidenceBlock).exists()).toBe(false);
......
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