Commit 18308017 authored by Savas Vedova's avatar Savas Vedova

Merge branch '249550-remove-feature-flag-for-core-mr-widget' into 'master'

Remove core_security_mr_widget feature flag

See merge request gitlab-org/gitlab!53066
parents 4e59e7f2 16d1bc4a
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
); );
}, },
shouldRenderSecurityReport() { shouldRenderSecurityReport() {
return Boolean(window.gon?.features?.coreSecurityMrWidget && this.mr.pipeline.id); return Boolean(this.mr.pipeline.id);
}, },
mergeError() { mergeError() {
let { mergeError } = this.mr; let { mergeError } = this.mr;
......
...@@ -36,7 +36,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -36,7 +36,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:drag_comment_selection, @project, default_enabled: true) push_frontend_feature_flag(:drag_comment_selection, @project, default_enabled: true)
push_frontend_feature_flag(:unified_diff_components, @project, default_enabled: true) push_frontend_feature_flag(:unified_diff_components, @project, default_enabled: true)
push_frontend_feature_flag(:default_merge_ref_for_diffs, @project) push_frontend_feature_flag(:default_merge_ref_for_diffs, @project)
push_frontend_feature_flag(:core_security_mr_widget, @project, default_enabled: true)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project) push_frontend_feature_flag(:core_security_mr_widget_counts, @project)
push_frontend_feature_flag(:remove_resolve_note, @project, default_enabled: true) push_frontend_feature_flag(:remove_resolve_note, @project, default_enabled: true)
push_frontend_feature_flag(:diffs_gradual_load, @project, default_enabled: true) push_frontend_feature_flag(:diffs_gradual_load, @project, default_enabled: true)
......
---
name: core_security_mr_widget
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44639
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/249543
milestone: '13.5'
type: development
group: group::static analysis
default_enabled: true
...@@ -128,14 +128,7 @@ with this approach, however, and there is a ...@@ -128,14 +128,7 @@ with this approach, however, and there is a
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4393) in GitLab Free 13.5. > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4393) in GitLab Free 13.5.
> - Made [available in all tiers](https://gitlab.com/gitlab-org/gitlab/-/issues/273205) in 13.6. > - Made [available in all tiers](https://gitlab.com/gitlab-org/gitlab/-/issues/273205) in 13.6.
> - Report download dropdown [added](https://gitlab.com/gitlab-org/gitlab/-/issues/273418) in 13.7. > - Report download dropdown [added](https://gitlab.com/gitlab-org/gitlab/-/issues/273418) in 13.7.
> - It's [deployed behind a feature flag](../feature_flags.md), enabled by default. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/249550) in GitLab 13.9.
> - It's enabled on GitLab.com.
> - It can be enabled or disabled for a single project.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-the-basic-security-widget). **(FREE SELF)**
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
Merge requests which have run security scans let you know that the generated Merge requests which have run security scans let you know that the generated
reports are available to download. To download a report, click on the reports are available to download. To download a report, click on the
...@@ -667,31 +660,6 @@ Analyzer results are displayed in the [job logs](../../ci/jobs/index.md#expand-a ...@@ -667,31 +660,6 @@ Analyzer results are displayed in the [job logs](../../ci/jobs/index.md#expand-a
or [Security Dashboard](security_dashboard/index.md). or [Security Dashboard](security_dashboard/index.md).
There is [an open issue](https://gitlab.com/gitlab-org/gitlab/-/issues/235772) in which changes to this behavior are being discussed. There is [an open issue](https://gitlab.com/gitlab-org/gitlab/-/issues/235772) in which changes to this behavior are being discussed.
### Enable or disable the basic security widget **(FREE SELF)**
The basic security widget is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../feature_flags.md)
can opt to disable it.
To enable it:
```ruby
# For the instance
Feature.enable(:core_security_mr_widget)
# For a single project
Feature.enable(:core_security_mr_widget, Project.find(<project id>))
```
To disable it:
```ruby
# For the instance
Feature.disable(:core_security_mr_widget)
# For a single project
Feature.disable(:core_security_mr_widget, Project.find(<project id>))
```
### Error: job `is used for configuration only, and its script should not be executed` ### Error: job `is used for configuration only, and its script should not be executed`
[Changes made in GitLab 13.4](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41260) [Changes made in GitLab 13.4](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41260)
......
...@@ -1007,12 +1007,11 @@ describe('ee merge request widget options', () => { ...@@ -1007,12 +1007,11 @@ describe('ee merge request widget options', () => {
describe('CE security report', () => { describe('CE security report', () => {
describe.each` describe.each`
context | canReadVulnerabilities | hasPipeline | featureFlag | shouldRender context | canReadVulnerabilities | hasPipeline | shouldRender
${'user cannot read vulnerabilities'} | ${false} | ${true} | ${true} | ${true} ${'user cannot read vulnerabilities'} | ${false} | ${true} | ${true}
${'user can read vulnerabilities'} | ${true} | ${true} | ${true} | ${false} ${'user can read vulnerabilities'} | ${true} | ${true} | ${false}
${'no pipeline'} | ${false} | ${false} | ${true} | ${false} ${'no pipeline'} | ${false} | ${false} | ${false}
${'the feature flag is disabled'} | ${false} | ${true} | ${false} | ${false} `('given $context', ({ canReadVulnerabilities, hasPipeline, shouldRender }) => {
`('given $context', ({ canReadVulnerabilities, hasPipeline, featureFlag, shouldRender }) => {
beforeEach(() => { beforeEach(() => {
gl.mrWidgetData = { gl.mrWidgetData = {
...mockData, ...mockData,
...@@ -1020,8 +1019,6 @@ describe('ee merge request widget options', () => { ...@@ -1020,8 +1019,6 @@ describe('ee merge request widget options', () => {
pipeline: hasPipeline ? mockData.pipeline : undefined, pipeline: hasPipeline ? mockData.pipeline : undefined,
}; };
gon.features = { coreSecurityMrWidget: featureFlag };
createComponent({ createComponent({
propsData: { mrData: gl.mrWidgetData }, propsData: { mrData: gl.mrWidgetData },
apolloProvider: createMockApollo([ apolloProvider: createMockApollo([
......
...@@ -825,14 +825,11 @@ describe('MrWidgetOptions', () => { ...@@ -825,14 +825,11 @@ describe('MrWidgetOptions', () => {
describe('security widget', () => { describe('security widget', () => {
describe.each` describe.each`
context | hasPipeline | isFlagEnabled | shouldRender context | hasPipeline | shouldRender
${'has pipeline and flag enabled'} | ${true} | ${true} | ${true} ${'there is a pipeline'} | ${true} | ${true}
${'has pipeline and flag disabled'} | ${true} | ${false} | ${false} ${'no pipeline'} | ${false} | ${false}
${'no pipeline and flag enabled'} | ${false} | ${true} | ${false} `('given $context', ({ hasPipeline, shouldRender }) => {
`('given $context', ({ hasPipeline, isFlagEnabled, shouldRender }) => {
beforeEach(() => { beforeEach(() => {
gon.features.coreSecurityMrWidget = isFlagEnabled;
const mrData = { const mrData = {
...mockData, ...mockData,
...(hasPipeline ? {} : { pipeline: null }), ...(hasPipeline ? {} : { pipeline: null }),
......
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