From 5516d5a669cbf1388c52d89271295a4a7241de11 Mon Sep 17 00:00:00 2001 From: Josianne Hyson Date: Fri, 19 Aug 2022 16:54:55 +1200 Subject: [PATCH] Remove FF for seat count usage alerts These alerts have been running in production for a couple of months now so we can remove the FF and keep the new code. This will mean that all group owners on GitLab.com will see seat usage alerts as the approach the seat count in their subscription. Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/362041 Changelog: changed EE: true --- .../development/seat_count_alerts.yml | 8 -------- .../gitlab_subscriptions/seat_count_alert.rb | 1 - .../gitlab_subscriptions/seat_count_alert_spec.rb | 8 -------- .../gitlab_subscriptions/seat_count_alert_spec.rb | 11 ----------- .../concerns/seat_count_alert_shared_examples.rb | 14 -------------- 5 files changed, 42 deletions(-) delete mode 100644 config/feature_flags/development/seat_count_alerts.yml diff --git a/config/feature_flags/development/seat_count_alerts.yml b/config/feature_flags/development/seat_count_alerts.yml deleted file mode 100644 index 9b2f3a2ef55ca3..00000000000000 --- a/config/feature_flags/development/seat_count_alerts.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: seat_count_alerts -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89204 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/362041 -milestone: '15.1' -type: development -group: group::purchase -default_enabled: false diff --git a/ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb b/ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb index e3eb77351a1bf8..ea452b3d362ae2 100644 --- a/ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb +++ b/ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb @@ -4,7 +4,6 @@ module GitlabSubscriptions module SeatCountAlert def generate_seat_count_alert_data(namespace) return unless current_user && (root_ancestor = namespace&.root_ancestor) - return if Feature.disabled?(:seat_count_alerts, root_ancestor) GitlabSubscriptions::Reconciliations::CalculateSeatCountDataService.new( namespace: root_ancestor, diff --git a/ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb b/ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb index f304ff26945c0d..528098a0b5b878 100644 --- a/ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb +++ b/ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb @@ -32,14 +32,6 @@ end end - context 'when the feature flag is disabled' do - it 'does not set the seat count data' do - stub_feature_flags(seat_count_alerts: false) - - expect(controller.generate_seat_count_alert_data(root_ancestor)).to be_nil - end - end - context 'when supplied a project' do it 'sets the data based on the root ancestor' do project = build(:project, namespace: root_ancestor) diff --git a/ee/spec/features/gitlab_subscriptions/seat_count_alert_spec.rb b/ee/spec/features/gitlab_subscriptions/seat_count_alert_spec.rb index b87f862a2e5497..06477a84290c48 100644 --- a/ee/spec/features/gitlab_subscriptions/seat_count_alert_spec.rb +++ b/ee/spec/features/gitlab_subscriptions/seat_count_alert_spec.rb @@ -58,17 +58,6 @@ it_behaves_like 'a hidden alert' end - context 'when the feature flag is disabled' do - before do - group.add_owner(user) - sign_in(user) - - stub_feature_flags(seat_count_alerts: false) - end - - it_behaves_like 'a hidden alert' - end - context 'when the user is eligible for the alert' do before do group.add_owner(user) diff --git a/ee/spec/support/shared_examples/controllers/concerns/seat_count_alert_shared_examples.rb b/ee/spec/support/shared_examples/controllers/concerns/seat_count_alert_shared_examples.rb index e8966407713d49..33eb8dc7230ae7 100644 --- a/ee/spec/support/shared_examples/controllers/concerns/seat_count_alert_shared_examples.rb +++ b/ee/spec/support/shared_examples/controllers/concerns/seat_count_alert_shared_examples.rb @@ -22,20 +22,6 @@ end end - context 'when the feature flag is disabled' do - it 'sets the seat_count_data to nil' do - stub_feature_flags(seat_count_alerts: false) - - allow_next_instance_of(GitlabSubscriptions::Reconciliations::CalculateSeatCountDataService) do |service| - allow(service).to receive(:execute).and_return(seat_count_data) - end - - subject - - expect(assigns(:seat_count_data)).to be_nil - end - end - context 'when the namespace does not qualify for the alert' do it 'sets the seat_count_data to nil' do allow_next_instance_of(GitlabSubscriptions::Reconciliations::CalculateSeatCountDataService) do |service| -- GitLab