Commit 3d2b0629 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'cherry-pick-aa44cd51' into 'master'

Fix alert management fingerprints

See merge request gitlab-org/gitlab!61224
parents 63175a9d bbd42c20
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
fpayload = fpayload['flow'].except('time', 'Summary') fpayload = fpayload['flow'].except('time', 'Summary')
fpayload['l4']['TCP'].delete('flags') if fpayload.dig('l4', 'TCP', 'flags') fpayload['l4']['TCP'].delete('flags') if fpayload.dig('l4', 'TCP', 'flags')
fpayload.to_s fpayload.to_json
end end
end end
end end
......
...@@ -13,7 +13,7 @@ RSpec.describe Gitlab::AlertManagement::Payload::Cilium do ...@@ -13,7 +13,7 @@ RSpec.describe Gitlab::AlertManagement::Payload::Cilium do
it 'parses cilium specific fields' do it 'parses cilium specific fields' do
expect(parsed_payload.title).to eq('Cilium Alert') expect(parsed_payload.title).to eq('Cilium Alert')
expect(parsed_payload.description).to eq('POLICY_DENIED') expect(parsed_payload.description).to eq('POLICY_DENIED')
expect(parsed_payload.gitlab_fingerprint).to eq('b2ad2a791756abe01692270c6a846129a09891b3') expect(parsed_payload.gitlab_fingerprint).to eq('23907c66f431ae66aad738553ccbd03e26f6838f')
end end
context 'when title is not provided' do context 'when title is not provided' do
......
...@@ -31,7 +31,7 @@ RSpec.describe AlertManagement::NetworkAlertService do ...@@ -31,7 +31,7 @@ RSpec.describe AlertManagement::NetworkAlertService do
ended_at: nil, ended_at: nil,
environment_id: nil, environment_id: nil,
events: 1, events: 1,
fingerprint: '89269ffa3902af37f036a77bc9ea57cdee3a52c2', fingerprint: '23907c66f431ae66aad738553ccbd03e26f6838f',
hosts: [], hosts: [],
issue_id: nil, issue_id: nil,
monitoring_tool: 'Cilium', monitoring_tool: 'Cilium',
...@@ -62,7 +62,7 @@ RSpec.describe AlertManagement::NetworkAlertService do ...@@ -62,7 +62,7 @@ RSpec.describe AlertManagement::NetworkAlertService do
it_behaves_like 'never-before-seen network alert' it_behaves_like 'never-before-seen network alert'
context 'for an existing alert with the same fingerprint' do context 'for an existing alert with the same fingerprint' do
let_it_be(:fingerprint_sha) { '89269ffa3902af37f036a77bc9ea57cdee3a52c2' } let_it_be(:fingerprint_sha) { '23907c66f431ae66aad738553ccbd03e26f6838f' }
context 'which is triggered' do context 'which is triggered' do
let_it_be(:alert) do let_it_be(:alert) do
......
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