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';
import ErrorTrackingList from './components/error_tracking_list.vue';
export default () => {
if (!gon.features.errorTracking) {
return;
}
// eslint-disable-next-line no-new
new Vue({
el: '#js-error_tracking',
......
# frozen_string_literal: true
class Projects::ErrorTrackingController < Projects::ApplicationController
before_action :check_feature_flag!
before_action :authorize_read_sentry_issue!
before_action :push_feature_flag_to_frontend
POLLING_INTERVAL = 10_000
......@@ -43,12 +41,4 @@ class Projects::ErrorTrackingController < Projects::ApplicationController
.new(project: project, user: current_user)
.represent(errors)
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
......@@ -285,7 +285,7 @@ module ProjectsHelper
# overridden in EE
def settings_operations_available?
Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project)
can?(current_user, :read_environment, @project)
end
private
......
......@@ -227,7 +227,7 @@
%span
= _('Environments')
- if project_nav_tab?(:error_tracking) && Feature.enabled?(:error_tracking, @project)
- if project_nav_tab?(:error_tracking)
= 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
%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
......
......@@ -20,18 +20,6 @@ describe Projects::ErrorTrackingController do
expect(response).to render_template(:index)
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
before do
project.add_guest(user)
......
......@@ -41,18 +41,6 @@ describe Projects::Settings::OperationsController do
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
before do
project.add_reporter(user)
......@@ -121,18 +109,6 @@ describe Projects::Settings::OperationsController do
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
before do
project.add_reporter(user)
......
......@@ -8,32 +8,16 @@ describe 'Projects > Settings > For a forked project', :js do
let(:role) { :maintainer }
before do
stub_feature_flags(error_tracking: true)
sign_in(user)
project.add_role(user, role)
end
describe 'Sidebar > Operations' do
context 'when sidebar feature flag enabled' do
it 'renders the settings link in the sidebar' do
visit project_path(project)
wait_for_requests
it 'renders the settings link in the sidebar' do
visit project_path(project)
wait_for_requests
expect(page).to have_selector('a[title="Operations"]', visible: false)
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
expect(page).to have_selector('a[title="Operations"]', visible: false)
end
end
end
......@@ -13,8 +13,6 @@ describe 'projects/settings/operations/show' do
describe 'Operations > Error Tracking' do
before do
stub_feature_flags(error_tracking: true)
project.add_reporter(user)
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