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
7d72d038
Commit
7d72d038
authored
May 11, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Alert#starts_at_raw for gitlab_fingerprint
Fixes `gitlab_fingerprint` by using `starts_at_row`
parent
9c382b63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/alerting/alert.rb
lib/gitlab/alerting/alert.rb
+2
-2
spec/lib/gitlab/alerting/alert_spec.rb
spec/lib/gitlab/alerting/alert_spec.rb
+2
-2
No files found.
lib/gitlab/alerting/alert.rb
View file @
7d72d038
...
...
@@ -121,9 +121,9 @@ module Gitlab
def
plain_gitlab_fingerprint
if
gitlab_managed?
[
metric_id
,
starts_at
].
join
(
'/'
)
[
metric_id
,
starts_at
_raw
].
join
(
'/'
)
else
# self managed
[
starts_at
,
title
,
full_query
].
join
(
'/'
)
[
starts_at
_raw
,
title
,
full_query
].
join
(
'/'
)
end
end
...
...
spec/lib/gitlab/alerting/alert_spec.rb
View file @
7d72d038
...
...
@@ -253,7 +253,7 @@ describe Gitlab::Alerting::Alert do
include_context
'gitlab alert'
it
'returns a fingerprint'
do
plain_fingerprint
=
[
alert
.
metric_id
,
alert
.
starts_at
].
join
(
'/'
)
plain_fingerprint
=
[
alert
.
metric_id
,
alert
.
starts_at
_raw
].
join
(
'/'
)
is_expected
.
to
eq
(
Digest
::
SHA1
.
hexdigest
(
plain_fingerprint
))
end
...
...
@@ -263,7 +263,7 @@ describe Gitlab::Alerting::Alert do
include_context
'full query'
it
'returns a fingerprint'
do
plain_fingerprint
=
[
alert
.
starts_at
,
alert
.
title
,
alert
.
full_query
].
join
(
'/'
)
plain_fingerprint
=
[
alert
.
starts_at
_raw
,
alert
.
title
,
alert
.
full_query
].
join
(
'/'
)
is_expected
.
to
eq
(
Digest
::
SHA1
.
hexdigest
(
plain_fingerprint
))
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