Skip to content
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
11 changes: 9 additions & 2 deletions elementary/monitor/alerts/source_freshness_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,16 @@ def error_message(self) -> str:

@property
def summary(self) -> str:
source_fqn = ".".join(
[
part
for part in [self.database_name, self.schema_name, self.identifier]
if part
]
)
if self.original_status == "runtime error":
return f'Failed to calculate the source freshness of "{self.source_name}"'
return f'Freshness exceeded the acceptable times on source "{self.source_name}"'
return f'Failed to calculate the source freshness of "{source_fqn}"'
return f'Freshness exceeded the acceptable times on source "{source_fqn}"'

def get_report_link(self) -> Optional[ReportLinkData]:
return get_test_runs_link(self.report_url, self.source_freshness_execution_id)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\"",
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\"",
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\"",
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\"",
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\"",
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\"",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\"",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\"",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\"",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\"",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\"",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\""
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\""
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\""
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\""
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Error: Freshness exceeded the acceptable times on source \"test_source\""
"text": "Error: Freshness exceeded the acceptable times on source \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\""
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\""
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\""
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\""
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "header",
"text": {
"type": "plain_text",
"text": "Runtime Error: Failed to calculate the source freshness of \"test_source\""
"text": "Runtime Error: Failed to calculate the source freshness of \"test_db.test_schema.test_identifier\""
}
},
{
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/alerts/alert_messages/test_alert_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ def build_base_source_freshness_alert_model(
return SourceFreshnessAlertModel(
id="test_id",
source_name="test_source",
database_name="test_db",
schema_name="test_schema",
identifier="test_identifier",
original_status=status,
path=path,
Expand Down