Skip to content

fix(crons): Properly send fingerprint array through issue platform #51103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/sentry/monitors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ def mark_failed(self, last_checkin=None, reason=MonitorFailure.UNKNOWN):
resource_id=None,
project_id=self.monitor.project_id,
event_id=uuid.uuid4().hex,
fingerprint=hash_from_values(
["monitor", str(self.monitor.guid), occurrence_data["reason"]]
),
fingerprint=[
hash_from_values(["monitor", str(self.monitor.guid), occurrence_data["reason"]])
],
type=occurrence_data["group_type"],
issue_title=f"Monitor failure: {self.monitor.name}",
subtitle="",
Expand Down
6 changes: 3 additions & 3 deletions tests/sentry/monitors/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def test_mark_failed_default_params_issue_platform(self, mock_produce_occurrence
occurrence,
**{
"project_id": self.project.id,
"fingerprint": hash_from_values(["monitor", str(monitor.guid), "error"]),
"fingerprint": [hash_from_values(["monitor", str(monitor.guid), "error"])],
"issue_title": f"Monitor failure: {monitor.name}",
"subtitle": "",
"resource_id": None,
Expand Down Expand Up @@ -393,7 +393,7 @@ def test_mark_failed_with_reason_issue_platform(self, mock_produce_occurrence_to
occurrence,
**{
"project_id": self.project.id,
"fingerprint": hash_from_values(["monitor", str(monitor.guid), "duration"]),
"fingerprint": [hash_from_values(["monitor", str(monitor.guid), "duration"])],
"issue_title": f"Monitor failure: {monitor.name}",
"subtitle": "",
"resource_id": None,
Expand Down Expand Up @@ -466,7 +466,7 @@ def test_mark_failed_with_missed_reason_issue_platform(self, mock_produce_occurr
occurrence,
**{
"project_id": self.project.id,
"fingerprint": hash_from_values(["monitor", str(monitor.guid), "missed_checkin"]),
"fingerprint": [hash_from_values(["monitor", str(monitor.guid), "missed_checkin"])],
"issue_title": f"Monitor failure: {monitor.name}",
"subtitle": "",
"resource_id": None,
Expand Down