Commit 77eff52a authored by Peter Leitzen's avatar Peter Leitzen

Remove `error_tracking` feature flag

We introduced the feature flag `error_tracking` to test the Sentry MVC
safely.

After the successful test, we remove it again.
parent 75b1837d
...@@ -4,10 +4,6 @@ import store from './store'; ...@@ -4,10 +4,6 @@ import store from './store';
import ErrorTrackingList from './components/error_tracking_list.vue'; import ErrorTrackingList from './components/error_tracking_list.vue';
export default () => { export default () => {
if (!gon.features.errorTracking) {
return;
}
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
new Vue({ new Vue({
el: '#js-error_tracking', el: '#js-error_tracking',
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::ErrorTrackingController < Projects::ApplicationController class Projects::ErrorTrackingController < Projects::ApplicationController
before_action :check_feature_flag!
before_action :authorize_read_sentry_issue! before_action :authorize_read_sentry_issue!
before_action :push_feature_flag_to_frontend
POLLING_INTERVAL = 10_000 POLLING_INTERVAL = 10_000
...@@ -43,12 +41,4 @@ class Projects::ErrorTrackingController < Projects::ApplicationController ...@@ -43,12 +41,4 @@ class Projects::ErrorTrackingController < Projects::ApplicationController
.new(project: project, user: current_user) .new(project: project, user: current_user)
.represent(errors) .represent(errors)
end end
def check_feature_flag!
render_404 unless Feature.enabled?(:error_tracking, project)
end
def push_feature_flag_to_frontend
push_frontend_feature_flag(:error_tracking, current_user)
end
end end
...@@ -285,7 +285,7 @@ module ProjectsHelper ...@@ -285,7 +285,7 @@ module ProjectsHelper
# overridden in EE # overridden in EE
def settings_operations_available? def settings_operations_available?
Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project) can?(current_user, :read_environment, @project)
end end
private private
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
%span %span
= _('Environments') = _('Environments')
- if project_nav_tab?(:error_tracking) && Feature.enabled?(:error_tracking, @project) - if project_nav_tab?(:error_tracking)
= nav_link(controller: :error_tracking) do = nav_link(controller: :error_tracking) do
= link_to project_error_tracking_index_path(@project), title: _('Error Tracking'), class: 'shortcuts-tracking qa-operations-tracking-link' do = link_to project_error_tracking_index_path(@project), title: _('Error Tracking'), class: 'shortcuts-tracking qa-operations-tracking-link' do
%span %span
......
- return unless Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project) - return unless can?(current_user, :read_environment, @project)
- setting = error_tracking_setting - setting = error_tracking_setting
......
...@@ -20,18 +20,6 @@ describe Projects::ErrorTrackingController do ...@@ -20,18 +20,6 @@ describe Projects::ErrorTrackingController do
expect(response).to render_template(:index) expect(response).to render_template(:index)
end end
context 'with feature flag disabled' do
before do
stub_feature_flags(error_tracking: false)
end
it 'returns 404' do
get :index, params: project_params
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'with insufficient permissions' do context 'with insufficient permissions' do
before do before do
project.add_guest(user) project.add_guest(user)
......
...@@ -41,18 +41,6 @@ describe Projects::Settings::OperationsController do ...@@ -41,18 +41,6 @@ describe Projects::Settings::OperationsController do
end end
end end
context 'with feature flag disabled' do
before do
stub_feature_flags(error_tracking: false)
end
it 'renders 404' do
get :show, params: project_params(project)
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'with insufficient permissions' do context 'with insufficient permissions' do
before do before do
project.add_reporter(user) project.add_reporter(user)
...@@ -121,18 +109,6 @@ describe Projects::Settings::OperationsController do ...@@ -121,18 +109,6 @@ describe Projects::Settings::OperationsController do
end end
end end
context 'with feature flag disabled' do
before do
stub_feature_flags(error_tracking: false)
end
it 'renders 404' do
patch :update, params: project_params(project)
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'with insufficient permissions' do context 'with insufficient permissions' do
before do before do
project.add_reporter(user) project.add_reporter(user)
......
...@@ -8,13 +8,11 @@ describe 'Projects > Settings > For a forked project', :js do ...@@ -8,13 +8,11 @@ describe 'Projects > Settings > For a forked project', :js do
let(:role) { :maintainer } let(:role) { :maintainer }
before do before do
stub_feature_flags(error_tracking: true)
sign_in(user) sign_in(user)
project.add_role(user, role) project.add_role(user, role)
end end
describe 'Sidebar > Operations' do describe 'Sidebar > Operations' do
context 'when sidebar feature flag enabled' do
it 'renders the settings link in the sidebar' do it 'renders the settings link in the sidebar' do
visit project_path(project) visit project_path(project)
wait_for_requests wait_for_requests
...@@ -22,18 +20,4 @@ describe 'Projects > Settings > For a forked project', :js do ...@@ -22,18 +20,4 @@ describe 'Projects > Settings > For a forked project', :js do
expect(page).to have_selector('a[title="Operations"]', visible: false) expect(page).to have_selector('a[title="Operations"]', visible: false)
end end
end end
context 'when sidebar feature flag disabled' do
before do
stub_feature_flags(error_tracking: false)
end
it 'does not render the settings link in the sidebar' do
visit project_path(project)
wait_for_requests
expect(page).not_to have_selector('a[title="Operations"]', visible: false)
end
end
end
end end
...@@ -13,8 +13,6 @@ describe 'projects/settings/operations/show' do ...@@ -13,8 +13,6 @@ describe 'projects/settings/operations/show' do
describe 'Operations > Error Tracking' do describe 'Operations > Error Tracking' do
before do before do
stub_feature_flags(error_tracking: true)
project.add_reporter(user) project.add_reporter(user)
allow(view).to receive(:error_tracking_setting) allow(view).to receive(:error_tracking_setting)
......
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