Commit 894ea34c authored by Alex Kalderimis's avatar Alex Kalderimis

Remove feature flag for design management reference filter

This completes the release of the design reference filter
parent f207da68
---
title: Enable design management reference filter
merge_request: 43731
author:
type: added
---
name: design_management_reference_filter_gfm_pipeline
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
...@@ -263,10 +263,7 @@ Feature.disable(:design_management_todo_button) ...@@ -263,10 +263,7 @@ Feature.disable(:design_management_todo_button)
## Referring to designs in Markdown ## Referring to designs in Markdown
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217160) in **GitLab 13.1**. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217160) in **GitLab 13.1**.
> - It is deployed behind a feature flag, disabled by default. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/258662) in **GitLab 13.5**
> - It is disabled on GitLab.com.
> - It is not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-design-references). **(CORE ONLY)**
We support referring to designs in [Markdown](../../markdown.md), which is available We support referring to designs in [Markdown](../../markdown.md), which is available
throughout the application, including in merge request and issue descriptions, in discussions and comments, and in wiki pages. throughout the application, including in merge request and issue descriptions, in discussions and comments, and in wiki pages.
...@@ -282,25 +279,6 @@ This will be rendered as: ...@@ -282,25 +279,6 @@ This will be rendered as:
> See [#123[homescreen.png]](https://gitlab.com/your-group/your-project/-/issues/123/designs/homescreen.png) > See [#123[homescreen.png]](https://gitlab.com/your-group/your-project/-/issues/123/designs/homescreen.png)
### Enable or disable design references **(CORE ONLY)**
Design reference parsing is
deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can disable it for your instance.
To disable it:
```ruby
Feature.disable(:design_management_reference_filter_gfm_pipeline)
```
To re-enable it:
```ruby
Feature.enable(:design_management_reference_filter_gfm_pipeline)
```
## Design activity records ## Design activity records
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33051) in GitLab 13.1. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33051) in GitLab 13.1.
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module Banzai module Banzai
module Filter module Filter
class DesignReferenceFilter < AbstractReferenceFilter class DesignReferenceFilter < AbstractReferenceFilter
FEATURE_FLAG = :design_management_reference_filter_gfm_pipeline
class Identifier class Identifier
include Comparable include Comparable
attr_reader :issue_iid, :filename attr_reader :issue_iid, :filename
...@@ -35,14 +33,6 @@ module Banzai ...@@ -35,14 +33,6 @@ module Banzai
self.reference_type = :design self.reference_type = :design
# This filter must be enabled by setting the
# design_management_reference_filter_gfm_pipeline flag
def call
return doc unless enabled?
super
end
def find_object(project, identifier) def find_object(project, identifier)
records_per_parent[project][identifier] records_per_parent[project][identifier]
end end
...@@ -112,10 +102,6 @@ module Banzai ...@@ -112,10 +102,6 @@ module Banzai
.in_groups_of(100, false) # limitation of by_issue_id_and_filename, so we batch .in_groups_of(100, false) # limitation of by_issue_id_and_filename, so we batch
.flat_map { |ids| DesignManagement::Design.by_issue_id_and_filename(ids) } .flat_map { |ids| DesignManagement::Design.by_issue_id_and_filename(ids) }
end end
def enabled?
Feature.enabled?(FEATURE_FLAG, parent, default_enabled: true)
end
end end
end end
end end
...@@ -90,34 +90,5 @@ RSpec.describe 'viewing issues with design references' do ...@@ -90,34 +90,5 @@ RSpec.describe 'viewing issues with design references' do
expect(page).not_to have_link(design_ref_b) expect(page).not_to have_link(design_ref_b)
end end
end end
context 'design management is enabled, but the filter is disabled globally' do
before do
enable_design_management
stub_feature_flags(
Banzai::Filter::DesignReferenceFilter::FEATURE_FLAG => false
)
end
it 'processes design tab links successfully, and design references as issue references', :aggregate_failures do
visit_page_with_design_references
expect(page).to have_text('The designs I mentioned')
expect(page).to have_link(design_tab_ref)
expect(page).to have_link(issue_ref)
expect(page).not_to have_link(design_ref_a)
expect(page).not_to have_link(design_ref_b)
end
end
context 'design management is enabled, and the filter is enabled for the current project' do
before do
stub_feature_flags(
Banzai::Filter::DesignReferenceFilter::FEATURE_FLAG => public_project
)
end
it_behaves_like 'successful use of design link references'
end
end end
end end
...@@ -74,26 +74,6 @@ RSpec.describe Banzai::Filter::DesignReferenceFilter do ...@@ -74,26 +74,6 @@ RSpec.describe Banzai::Filter::DesignReferenceFilter do
it_behaves_like 'a no-op filter' it_behaves_like 'a no-op filter'
end end
context 'design reference filter is not enabled' do
before do
stub_feature_flags(described_class::FEATURE_FLAG => false)
end
it_behaves_like 'a no-op filter'
it 'issues no queries' do
expect { process(input_text) }.not_to exceed_query_limit(0)
end
end
context 'the filter is enabled for the context project' do
before do
stub_feature_flags(described_class::FEATURE_FLAG => project)
end
it_behaves_like 'a good link reference'
end
end end
end end
......
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