Skip to content

Commit

Permalink
after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Yacouby committed May 22, 2024
1 parent a1c24a3 commit 25d9e4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mlrun/common/schemas/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class AlertTemplate(
system_generated: bool = False

# AlertConfig fields that are pre-defined
description: Optional[str] = (
summary: Optional[str] = (
"String to be sent in the generated notifications e.g. 'Model {{project}}/{{entity}} is drifting.'"
"See AlertConfig.summary description"
)
Expand Down
6 changes: 4 additions & 2 deletions mlrun/utils/notifications/notification/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ def _get_alert_fields(
data_text = "\n".join(data_lines)
line.append(self._get_slack_row(f"*Event data:*\n{data_text}"))

uid = event_data.value_dict.get("uid")
if uid: # JOB entity
if (
event_data.entity.kind == mlrun.common.schemas.alert.EventEntityKind.JOB
): # JOB entity
uid = event_data.value_dict.get("uid")
url = mlrun.utils.helpers.get_ui_url(alert.project, uid)
overview_type = "Job overview"
else: # MODEL entity
Expand Down

0 comments on commit 25d9e4d

Please sign in to comment.