Commit 0f66959a authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '227146-remove-unused-ProcessPrometheusAlertWorker' into 'master'

Remove unused ProcessPrometheusAlertWorker worker

See merge request gitlab-org/gitlab!62579
parents 77eabfba 9ea5ec8d
...@@ -1087,15 +1087,6 @@ ...@@ -1087,15 +1087,6 @@
:weight: 2 :weight: 2
:idempotent: true :idempotent: true
:tags: [] :tags: []
- :name: incident_management:incident_management_process_prometheus_alert
:worker_name: IncidentManagement::ProcessPrometheusAlertWorker
:feature_category: :incident_management
:has_external_dependencies:
:urgency: :low
:resource_boundary: :cpu
:weight: 2
:idempotent:
:tags: []
- :name: jira_connect:jira_connect_sync_branch - :name: jira_connect:jira_connect_sync_branch
:worker_name: JiraConnect::SyncBranchWorker :worker_name: JiraConnect::SyncBranchWorker
:feature_category: :integrations :feature_category: :integrations
......
# frozen_string_literal: true
module IncidentManagement
class ProcessPrometheusAlertWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
queue_namespace :incident_management
feature_category :incident_management
worker_resource_boundary :cpu
def perform(project_id, alert_hash)
# no-op
#
# This worker is not scheduled anymore since
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35943
# and will be removed completely via
# https://gitlab.com/gitlab-org/gitlab/-/issues/227146
# in 14.0.
end
end
end
...@@ -306,7 +306,6 @@ RSpec.describe 'Every Sidekiq worker' do ...@@ -306,7 +306,6 @@ RSpec.describe 'Every Sidekiq worker' do
'IncidentManagement::OncallRotations::PersistAllRotationsShiftsJob' => 3, 'IncidentManagement::OncallRotations::PersistAllRotationsShiftsJob' => 3,
'IncidentManagement::OncallRotations::PersistShiftsJob' => 3, 'IncidentManagement::OncallRotations::PersistShiftsJob' => 3,
'IncidentManagement::PagerDuty::ProcessIncidentWorker' => 3, 'IncidentManagement::PagerDuty::ProcessIncidentWorker' => 3,
'IncidentManagement::ProcessPrometheusAlertWorker' => 3,
'InvalidGpgSignatureUpdateWorker' => 3, 'InvalidGpgSignatureUpdateWorker' => 3,
'IrkerWorker' => 3, 'IrkerWorker' => 3,
'IssuableExportCsvWorker' => 3, 'IssuableExportCsvWorker' => 3,
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe IncidentManagement::ProcessPrometheusAlertWorker do
describe '#perform' do
let_it_be(:project) { create(:project) }
let_it_be(:prometheus_alert) { create(:prometheus_alert, project: project) }
let(:payload_key) { Gitlab::AlertManagement::Payload::Prometheus.new(project: project, payload: alert_params).gitlab_fingerprint }
let!(:prometheus_alert_event) { create(:prometheus_alert_event, prometheus_alert: prometheus_alert, payload_key: payload_key) }
let!(:settings) { create(:project_incident_management_setting, project: project, create_issue: true) }
let(:alert_params) do
{
startsAt: prometheus_alert.created_at.rfc3339,
labels: {
gitlab_alert_id: prometheus_alert.prometheus_metric_id
}
}.with_indifferent_access
end
it 'does nothing' do
expect { subject.perform(project.id, alert_params) }
.not_to change(Issue, :count)
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