Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9ea5ec8d
Commit
9ea5ec8d
authored
May 26, 2021
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused ProcessPrometheusAlertWorker worker
Changelog: changed
parent
38235936
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
61 deletions
+0
-61
app/workers/all_queues.yml
app/workers/all_queues.yml
+0
-9
app/workers/incident_management/process_prometheus_alert_worker.rb
...rs/incident_management/process_prometheus_alert_worker.rb
+0
-23
spec/workers/every_sidekiq_worker_spec.rb
spec/workers/every_sidekiq_worker_spec.rb
+0
-1
spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
...cident_management/process_prometheus_alert_worker_spec.rb
+0
-28
No files found.
app/workers/all_queues.yml
View file @
9ea5ec8d
...
...
@@ -1087,15 +1087,6 @@
:weight:
2
:idempotent:
true
: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
:worker_name: JiraConnect::SyncBranchWorker
:feature_category: :integrations
...
...
app/workers/incident_management/process_prometheus_alert_worker.rb
deleted
100644 → 0
View file @
38235936
# 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
spec/workers/every_sidekiq_worker_spec.rb
View file @
9ea5ec8d
...
...
@@ -306,7 +306,6 @@ RSpec.describe 'Every Sidekiq worker' do
'IncidentManagement::OncallRotations::PersistAllRotationsShiftsJob'
=>
3
,
'IncidentManagement::OncallRotations::PersistShiftsJob'
=>
3
,
'IncidentManagement::PagerDuty::ProcessIncidentWorker'
=>
3
,
'IncidentManagement::ProcessPrometheusAlertWorker'
=>
3
,
'InvalidGpgSignatureUpdateWorker'
=>
3
,
'IrkerWorker'
=>
3
,
'IssuableExportCsvWorker'
=>
3
,
...
...
spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
deleted
100644 → 0
View file @
38235936
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment