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 { ...@@ -52,9 +52,6 @@ export default {
milestones() { milestones() {
return this.release.milestones || []; return this.release.milestones || [];
}, },
shouldShowEvidence() {
return this.glFeatures.releaseEvidenceCollection;
},
shouldRenderAssets() { shouldRenderAssets() {
return Boolean( return Boolean(
this.assets.links.length || (this.assets.sources && this.assets.sources.length), this.assets.links.length || (this.assets.sources && this.assets.sources.length),
...@@ -98,7 +95,7 @@ export default { ...@@ -98,7 +95,7 @@ export default {
</div> </div>
<release-block-assets v-if="shouldRenderAssets" :assets="assets" /> <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 ref="gfm-content" class="card-text gl-mt-3">
<div class="md" v-html="release.descriptionHtml"></div> <div class="md" v-html="release.descriptionHtml"></div>
......
...@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController ...@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :release, only: %i[edit show update downloads] before_action :release, only: %i[edit show update downloads]
before_action :authorize_read_release! before_action :authorize_read_release!
before_action do 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_release_data, project, default_enabled: true)
push_frontend_feature_flag(:graphql_milestone_stats, 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) 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: ...@@ -79,10 +79,10 @@ To enable a feature, run:
Feature.enable(:<feature flag>) Feature.enable(:<feature flag>)
``` ```
Example, to enable Evidence Collection: Example, to enable a fictional feature flag named `my_awesome_feature`:
```ruby ```ruby
Feature.enable(:release_evidence_collection) Feature.enable(:my_awesome_feature)
``` ```
To disable a feature, run: To disable a feature, run:
...@@ -91,10 +91,10 @@ To disable a feature, run: ...@@ -91,10 +91,10 @@ To disable a feature, run:
Feature.disable(:<feature flag>) Feature.disable(:<feature flag>)
``` ```
Example, to disable Evidence Collection: Example, to disable a fictional feature flag named `my_awesome_feature`:
```ruby ```ruby
Feature.disable(:release_evidence_collection) Feature.disable(:my_awesome_feature)
``` ```
Some feature flags can be enabled or disabled on a per project basis: Some feature flags can be enabled or disabled on a per project basis:
...@@ -112,18 +112,18 @@ Feature.enable(:product_analytics, Project.find(1234)) ...@@ -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: `Feature.enable` and `Feature.disable` always return `nil`, this is not an indication that the command failed:
```ruby ```ruby
irb(main):001:0> Feature.enable(:release_evidence_collection) irb(main):001:0> Feature.enable(:my_awesome_feature)
=> nil => 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 ```ruby
Feature.enable(:release_evidence_collection) Feature.enable(:my_awesome_feature)
=> nil => nil
Feature.enabled?(:release_evidence_collection) Feature.enabled?(:my_awesome_feature)
=> true => true
Feature.disabled?(:release_evidence_collection) Feature.disabled?(:my_awesome_feature)
=> false => false
``` ```
......
...@@ -449,21 +449,6 @@ In the API: ...@@ -449,21 +449,6 @@ In the API:
- If you do not specify a `released_at` date, release evidence is collected on the - If you do not specify a `released_at` date, release evidence is collected on the
date the release is created. 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 ## GitLab Releaser
> [Introduced](https://gitlab.com/gitlab-org/gitlab-releaser/-/merge_requests/6) in GitLab 12.10. > [Introduced](https://gitlab.com/gitlab-org/gitlab-releaser/-/merge_requests/6) in GitLab 12.10.
......
...@@ -131,18 +131,14 @@ describe('Release block', () => { ...@@ -131,18 +131,14 @@ describe('Release block', () => {
}); });
describe('evidence block', () => { describe('evidence block', () => {
it('renders the evidence block when the evidence is available and the feature flag is true', () => it('renders the evidence block when the evidence is available', () => {
factory(release, { releaseEvidenceCollection: true }).then(() => return factory(release).then(() => {
expect(wrapper.find(EvidenceBlock).exists()).toBe(true), 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('does not render the evidence block when there is no evidence', () => { it('does not render the evidence block when there is no evidence', () => {
release.evidenceSha = null; release.evidences = [];
return factory(release).then(() => { return factory(release).then(() => {
expect(wrapper.find(EvidenceBlock).exists()).toBe(false); 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