Commit 37a3f263 authored by Shinya Maeda's avatar Shinya Maeda

Remove fixed pipeline notification FF

This MR removes the feature flag as it's deemed stable
parent 1645f0fd
...@@ -120,8 +120,4 @@ module NotificationsHelper ...@@ -120,8 +120,4 @@ module NotificationsHelper
def can_read_project?(project) def can_read_project?(project)
can?(current_user, :read_project, project) can?(current_user, :read_project, project)
end end
def notification_event_disabled?(event)
event == :fixed_pipeline && !Gitlab::Ci::Features.pipeline_fixed_notifications?
end
end end
...@@ -1084,8 +1084,6 @@ module Ci ...@@ -1084,8 +1084,6 @@ module Ci
end end
def ensure_ci_ref! def ensure_ci_ref!
return unless Gitlab::Ci::Features.pipeline_fixed_notifications?
self.ci_ref = Ci::Ref.ensure_for(self) self.ci_ref = Ci::Ref.ensure_for(self)
end end
......
...@@ -47,8 +47,6 @@ module Ci ...@@ -47,8 +47,6 @@ module Ci
end end
def update_status_by!(pipeline) def update_status_by!(pipeline)
return unless Gitlab::Ci::Features.pipeline_fixed_notifications?
retry_lock(self) do retry_lock(self) do
next unless last_finished_pipeline_id == pipeline.id next unless last_finished_pipeline_id == pipeline.id
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#{ paragraph.html_safe } #{ paragraph.html_safe }
.col-lg-8 .col-lg-8
- notification_setting.email_events.each_with_index do |event, index| - notification_setting.email_events.each_with_index do |event, index|
- next if notification_event_disabled?(event)
- field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]"
.form-group .form-group
.form-check{ class: ("gl-mt-0" if index == 0) } .form-check{ class: ("gl-mt-0" if index == 0) }
......
...@@ -187,7 +187,7 @@ To minimize the number of notifications that do not require any action, from [Gi ...@@ -187,7 +187,7 @@ To minimize the number of notifications that do not require any action, from [Gi
| Remove milestone merge request | Subscribers, participants mentioned, and Custom notification level with this event selected | | Remove milestone merge request | Subscribers, participants mentioned, and Custom notification level with this event selected |
| New comment | The above, plus anyone mentioned by `@username` in the comment, with notification level "Mention" or higher | | New comment | The above, plus anyone mentioned by `@username` in the comment, with notification level "Mention" or higher |
| Failed pipeline | The author of the pipeline | | Failed pipeline | The author of the pipeline |
| Fixed pipeline | The author of the pipeline. Enabled by default. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24309) in GitLab 13.1. Administrators can disable this notification option using the `ci_pipeline_fixed_notifications` [feature flag](../../administration/feature_flags.md). | | Fixed pipeline | The author of the pipeline. Enabled by default. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24309) in GitLab 13.1. |
| Successful pipeline | The author of the pipeline, if they have the custom notification setting for successful pipelines set. If the pipeline failed previously, a `Fixed pipeline` message will be sent for the first successful pipeline after the failure, then a `Successful pipeline` message for any further successful pipelines. | | Successful pipeline | The author of the pipeline, if they have the custom notification setting for successful pipelines set. If the pipeline failed previously, a `Fixed pipeline` message will be sent for the first successful pipeline after the failure, then a `Successful pipeline` message for any further successful pipelines. |
| New epic **(ULTIMATE)** | | | New epic **(ULTIMATE)** | |
| Close epic **(ULTIMATE)** | | | Close epic **(ULTIMATE)** | |
......
...@@ -14,10 +14,6 @@ module Gitlab ...@@ -14,10 +14,6 @@ module Gitlab
::Feature.enabled?(:ci_job_heartbeats_runner, project, default_enabled: true) ::Feature.enabled?(:ci_job_heartbeats_runner, project, default_enabled: true)
end end
def self.pipeline_fixed_notifications?
::Feature.enabled?(:ci_pipeline_fixed_notifications, default_enabled: true)
end
def self.instance_variables_ui_enabled? def self.instance_variables_ui_enabled?
::Feature.enabled?(:ci_instance_variables_ui, default_enabled: true) ::Feature.enabled?(:ci_instance_variables_ui, default_enabled: true)
end end
......
...@@ -67,20 +67,6 @@ RSpec.describe 'Projects > Show > User manages notifications', :js do ...@@ -67,20 +67,6 @@ RSpec.describe 'Projects > Show > User manages notifications', :js do
end end
end end
end end
context 'when ci_pipeline_fixed_notifications is disabled' do
before do
stub_feature_flags(ci_pipeline_fixed_notifications: false)
end
it 'hides fixed_pipeline checkbox' do
visit project_path(project)
click_notifications_button
page.find('a[data-notification-level="custom"]').click
expect(page).not_to have_selector("input[name='notification_setting[fixed_pipeline]']")
end
end
end end
context 'when project emails are disabled' do context 'when project emails are disabled' do
......
...@@ -2918,25 +2918,9 @@ RSpec.describe Ci::Pipeline, :mailer do ...@@ -2918,25 +2918,9 @@ RSpec.describe Ci::Pipeline, :mailer do
describe '#ensure_ci_ref!' do describe '#ensure_ci_ref!' do
subject { pipeline.ensure_ci_ref! } subject { pipeline.ensure_ci_ref! }
shared_examples_for 'protected by feature flag' do
context 'when feature flag is disabled' do
before do
stub_feature_flags(ci_pipeline_fixed_notifications: false)
end
it 'does not do anything' do
expect(Ci::Ref).not_to receive(:ensure_for)
subject
end
end
end
context 'when ci_ref does not exist yet' do context 'when ci_ref does not exist yet' do
let!(:pipeline) { create(:ci_pipeline, ci_ref_presence: false) } let!(:pipeline) { create(:ci_pipeline, ci_ref_presence: false) }
it_behaves_like 'protected by feature flag'
it 'creates a new ci_ref and assigns it' do it 'creates a new ci_ref and assigns it' do
expect { subject }.to change { Ci::Ref.count }.by(1) expect { subject }.to change { Ci::Ref.count }.by(1)
...@@ -2947,8 +2931,6 @@ RSpec.describe Ci::Pipeline, :mailer do ...@@ -2947,8 +2931,6 @@ RSpec.describe Ci::Pipeline, :mailer do
context 'when ci_ref already exists' do context 'when ci_ref already exists' do
let!(:pipeline) { create(:ci_pipeline) } let!(:pipeline) { create(:ci_pipeline) }
it_behaves_like 'protected by feature flag'
it 'fetches a new ci_ref and assigns it' do it 'fetches a new ci_ref and assigns it' do
expect { subject }.not_to change { Ci::Ref.count } expect { subject }.not_to change { Ci::Ref.count }
......
...@@ -161,16 +161,6 @@ RSpec.describe Ci::Ref do ...@@ -161,16 +161,6 @@ RSpec.describe Ci::Ref do
it_behaves_like 'no-op' it_behaves_like 'no-op'
end end
context 'when feature flag is disabled' do
let(:pipeline) { create(:ci_pipeline, :success, ci_ref: ci_ref) }
before do
stub_feature_flags(ci_pipeline_fixed_notifications: false)
end
it_behaves_like 'no-op'
end
context 'when pipeline is not the latest pipeline' do context 'when pipeline is not the latest pipeline' do
let!(:pipeline) { create(:ci_pipeline, :success, ci_ref: ci_ref) } let!(:pipeline) { create(:ci_pipeline, :success, ci_ref: ci_ref) }
let!(:latest_pipeline) { create(:ci_pipeline, :success, ci_ref: ci_ref) } let!(:latest_pipeline) { create(:ci_pipeline, :success, ci_ref: ci_ref) }
......
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