Commit 77282d62 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '229158-remove-pagerduty_webhook-feature-flag' into 'master'

Remove pagerduty_webhook feature flag

See merge request gitlab-org/gitlab!37193
parents 5059c8bd 013360a9
......@@ -2,7 +2,6 @@
import { GlButton, GlTabs, GlTab } from '@gitlab/ui';
import AlertsSettingsForm from './alerts_form.vue';
import PagerDutySettingsForm from './pagerduty_form.vue';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { INTEGRATION_TABS_CONFIG, I18N_INTEGRATION_TABS } from '../constants';
export default {
......@@ -13,17 +12,8 @@ export default {
AlertsSettingsForm,
PagerDutySettingsForm,
},
mixins: [glFeatureFlagMixin()],
tabs: INTEGRATION_TABS_CONFIG,
i18n: I18N_INTEGRATION_TABS,
methods: {
isFeatureFlagEnabled(tab) {
if (tab.featureFlag) {
return this.glFeatures[tab.featureFlag];
}
return true;
},
},
};
</script>
......@@ -49,7 +39,7 @@ export default {
<gl-tabs>
<gl-tab
v-for="(tab, index) in $options.tabs"
v-if="tab.active && isFeatureFlagEnabled(tab)"
v-if="tab.active"
:key="`${tab.title}_${index}`"
:title="tab.title"
>
......
......@@ -11,7 +11,6 @@ export const INTEGRATION_TABS_CONFIG = [
title: s__('IncidentSettings|PagerDuty integration'),
component: 'PagerDutySettingsForm',
active: true,
featureFlag: 'pagerdutyWebhook',
},
{
title: s__('IncidentSettings|Grafana integration'),
......
......@@ -6,10 +6,6 @@ module Projects
before_action :authorize_admin_operations!
before_action :authorize_read_prometheus_alerts!, only: [:reset_alerting_token]
before_action do
push_frontend_feature_flag(:pagerduty_webhook, project)
end
respond_to :json, only: [:reset_alerting_token, :reset_pagerduty_token]
helper_method :error_tracking_setting
......
......@@ -40,7 +40,6 @@ module IncidentManagement
end
def webhook_available?
Feature.enabled?(:pagerduty_webhook, project) &&
incident_management_setting.pagerduty_active?
end
......
......@@ -39,7 +39,6 @@ module IncidentManagement
end
def webhook_setting_active?
Feature.enabled?(:pagerduty_webhook, project) &&
incident_management_setting.pagerduty_active?
end
......
---
title: Add PagerDuty incident integration.
merge_request: 37193
author:
type: added
......@@ -6,9 +6,7 @@ describe('IncidentsSettingTabs', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(IncidentsSettingTabs, {
provide: { glFeatures: { pagerdutyWebhook: true } },
});
wrapper = shallowMount(IncidentsSettingTabs);
});
afterEach(() => {
......
......@@ -12,11 +12,6 @@ RSpec.describe IncidentManagement::PagerDuty::CreateIncidentIssueService do
subject(:execute) { described_class.new(project, incident_payload).execute }
describe '#execute' do
context 'when pagerduty_webhook feature enabled' do
before do
stub_feature_flags(pagerduty_webhook: project)
end
context 'when PagerDuty webhook setting is active' do
let_it_be(:incident_management_setting) { create(:project_incident_management_setting, project: project, pagerduty_active: true) }
......@@ -85,20 +80,4 @@ RSpec.describe IncidentManagement::PagerDuty::CreateIncidentIssueService do
end
end
end
context 'when pagerduty_webhook feature disabled' do
before do
stub_feature_flags(pagerduty_webhook: false)
end
it 'does not create a GitLab issue' do
expect { execute }.not_to change(Issue, :count)
end
it 'responds with forbidden' do
expect(execute).to be_error
expect(execute.http_status).to eq(:forbidden)
end
end
end
end
......@@ -19,11 +19,6 @@ RSpec.describe IncidentManagement::PagerDuty::ProcessWebhookService do
subject(:execute) { described_class.new(project, nil, webhook_payload).execute(token) }
context 'when pagerduty_webhook feature is enabled' do
before do
stub_feature_flags(pagerduty_webhook: project)
end
context 'when PagerDuty webhook setting is active' do
let_it_be(:incident_management_setting) { create(:project_incident_management_setting, project: project, pagerduty_active: true) }
......@@ -129,20 +124,4 @@ RSpec.describe IncidentManagement::PagerDuty::ProcessWebhookService do
it_behaves_like 'does not process incidents'
end
end
context 'when pagerduty_webhook feature is disabled' do
before do
stub_feature_flags(pagerduty_webhook: false)
end
it 'responds with Forbidden' do
result = execute
expect(result).to be_error
expect(result.http_status).to eq(:forbidden)
end
it_behaves_like 'does not process incidents'
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