Commit a6e94c1d authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'tr-remove-runbook-feature-flag' into 'master'

Remove the `alert_runbooks` feature flag

See merge request gitlab-org/gitlab!39315
parents 32b05317 ad73eddc
...@@ -302,7 +302,6 @@ export default { ...@@ -302,7 +302,6 @@ export default {
/> />
</gl-form-group> </gl-form-group>
<gl-form-group <gl-form-group
v-if="glFeatures.alertRunbooks"
:label="s__('PrometheusAlerts|Runbook URL (optional)')" :label="s__('PrometheusAlerts|Runbook URL (optional)')"
label-for="alert-runbook" label-for="alert-runbook"
> >
......
...@@ -14,7 +14,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController ...@@ -14,7 +14,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
push_frontend_feature_flag(:prometheus_computed_alerts) push_frontend_feature_flag(:prometheus_computed_alerts)
push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate) push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate)
push_frontend_feature_flag(:alert_runbooks)
push_frontend_feature_flag(:metrics_dashboard_new_panel_page) push_frontend_feature_flag(:metrics_dashboard_new_panel_page)
end end
before_action :authorize_read_environment!, except: [:metrics, :additional_metrics, :metrics_dashboard, :metrics_redirect] before_action :authorize_read_environment!, except: [:metrics, :additional_metrics, :metrics_dashboard, :metrics_redirect]
......
...@@ -10,7 +10,6 @@ module Projects ...@@ -10,7 +10,6 @@ module Projects
before_action do before_action do
push_frontend_feature_flag(:prometheus_computed_alerts) push_frontend_feature_flag(:prometheus_computed_alerts)
push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate) push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate)
push_frontend_feature_flag(:alert_runbooks)
push_frontend_feature_flag(:metrics_dashboard_new_panel_page) push_frontend_feature_flag(:metrics_dashboard_new_panel_page)
end end
......
---
title: Add runbooks to metric alerts
merge_request: 39315
author:
type: added
...@@ -36,7 +36,7 @@ describe('AlertWidgetForm', () => { ...@@ -36,7 +36,7 @@ describe('AlertWidgetForm', () => {
configuredAlert: metricId, configuredAlert: metricId,
}; };
function createComponent(props = {}, featureFlags = {}) { function createComponent(props = {}) {
const propsData = { const propsData = {
...defaultProps, ...defaultProps,
...props, ...props,
...@@ -44,9 +44,6 @@ describe('AlertWidgetForm', () => { ...@@ -44,9 +44,6 @@ describe('AlertWidgetForm', () => {
wrapper = shallowMount(AlertWidgetForm, { wrapper = shallowMount(AlertWidgetForm, {
propsData, propsData,
provide: {
glFeatures: featureFlags,
},
stubs: { stubs: {
GlModal: ModalStub, GlModal: ModalStub,
}, },
...@@ -88,7 +85,7 @@ describe('AlertWidgetForm', () => { ...@@ -88,7 +85,7 @@ describe('AlertWidgetForm', () => {
}); });
it('emits a "create" event when form submitted without existing alert', async () => { it('emits a "create" event when form submitted without existing alert', async () => {
createComponent(defaultProps, { alertRunbooks: true }); createComponent(defaultProps);
modal().vm.$emit('shown'); modal().vm.$emit('shown');
...@@ -109,7 +106,7 @@ describe('AlertWidgetForm', () => { ...@@ -109,7 +106,7 @@ describe('AlertWidgetForm', () => {
}); });
it('resets form when modal is dismissed (hidden)', () => { it('resets form when modal is dismissed (hidden)', () => {
createComponent(defaultProps, { alertRunbooks: true }); createComponent(defaultProps);
modal().vm.$emit('shown'); modal().vm.$emit('shown');
...@@ -199,7 +196,7 @@ describe('AlertWidgetForm', () => { ...@@ -199,7 +196,7 @@ describe('AlertWidgetForm', () => {
it('emits "update" event when form changed', () => { it('emits "update" event when form changed', () => {
const updatedRunbookUrl = `${INVALID_URL}/test`; const updatedRunbookUrl = `${INVALID_URL}/test`;
createComponent(propsWithAlertData, { alertRunbooks: true }); createComponent(propsWithAlertData);
modal().vm.$emit('shown'); modal().vm.$emit('shown');
...@@ -231,15 +228,9 @@ describe('AlertWidgetForm', () => { ...@@ -231,15 +228,9 @@ describe('AlertWidgetForm', () => {
expect(submitButtonTrackingOpts()).toEqual(dataTrackingOptions.update); expect(submitButtonTrackingOpts()).toEqual(dataTrackingOptions.update);
}); });
describe('alert runbooks feature flag', () => { describe('alert runbooks', () => {
it('hides the runbook field when the flag is disabled', () => { it('shows the runbook field', () => {
createComponent(undefined, { alertRunbooks: false }); createComponent();
expect(findRunbookField().exists()).toBe(false);
});
it('shows the runbook field when the flag is enabled', () => {
createComponent(undefined, { alertRunbooks: true });
expect(findRunbookField().exists()).toBe(true); expect(findRunbookField().exists()).toBe(true);
}); });
......
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