mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix(reports): Add celery task execution ID to email notification logs (#35807)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
5218b4eea2
commit
61c68f7b8f
@@ -117,4 +117,4 @@ def test_report_with_header_data(
|
||||
assert header_data.get("notification_format") == report_schedule.report_format
|
||||
assert header_data.get("notification_source") == ReportSourceFormat.DASHBOARD
|
||||
assert header_data.get("notification_type") == report_schedule.type
|
||||
assert len(send_email_smtp_mock.call_args.kwargs["header_data"]) == 7
|
||||
assert len(send_email_smtp_mock.call_args.kwargs["header_data"]) == 8
|
||||
|
||||
@@ -64,6 +64,7 @@ def test_log_data_with_chart(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": None,
|
||||
"owners": [1, 2],
|
||||
"slack_channels": None,
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
@@ -94,6 +95,7 @@ def test_log_data_with_dashboard(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": 123,
|
||||
"owners": [1, 2],
|
||||
"slack_channels": None,
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
@@ -128,6 +130,7 @@ def test_log_data_with_email_recipients(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": 123,
|
||||
"owners": [1, 2],
|
||||
"slack_channels": [],
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
@@ -162,6 +165,7 @@ def test_log_data_with_slack_recipients(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": 123,
|
||||
"owners": [1, 2],
|
||||
"slack_channels": ["channel_1", "channel_2"],
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
@@ -195,6 +199,7 @@ def test_log_data_no_owners(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": 123,
|
||||
"owners": [],
|
||||
"slack_channels": ["channel_1", "channel_2"],
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
@@ -230,6 +235,7 @@ def test_log_data_with_missing_values(mocker: MockerFixture) -> None:
|
||||
"dashboard_id": None,
|
||||
"owners": [1, 2],
|
||||
"slack_channels": ["channel_1", "channel_2"],
|
||||
"execution_id": "execution_id_example",
|
||||
}
|
||||
|
||||
assert result == expected_result
|
||||
|
||||
@@ -47,6 +47,7 @@ def test_render_description_with_html() -> None:
|
||||
"chart_id": None,
|
||||
"dashboard_id": None,
|
||||
"slack_channels": None,
|
||||
"execution_id": "test-execution-id",
|
||||
},
|
||||
)
|
||||
email_body = (
|
||||
@@ -91,6 +92,7 @@ def test_email_subject_with_datetime() -> None:
|
||||
"chart_id": None,
|
||||
"dashboard_id": None,
|
||||
"slack_channels": None,
|
||||
"execution_id": "test-execution-id",
|
||||
},
|
||||
)
|
||||
subject = EmailNotification(
|
||||
|
||||
@@ -36,6 +36,7 @@ def mock_header_data() -> HeaderDataType:
|
||||
"chart_id": None,
|
||||
"dashboard_id": None,
|
||||
"slack_channels": ["some_channel"],
|
||||
"execution_id": "test-execution-id",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user