Skip to content

Commit 5d655d4

Browse files
authored
chore: log errors whenever we normally notify (#1679)
1 parent 4b8d429 commit 5d655d4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sqlmesh/core/context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ def _has_environment_changed() -> bool:
523523
self.notification_target_manager.notify(
524524
NotificationEvent.RUN_FAILURE, traceback.format_exc()
525525
)
526+
logger.error(f"Run Failure: {traceback.format_exc()}")
526527
raise e
527528

528529
if success:
@@ -926,6 +927,7 @@ def apply(self, plan: Plan) -> None:
926927
self.notification_target_manager.notify(
927928
NotificationEvent.APPLY_FAILURE, traceback.format_exc()
928929
)
930+
logger.error(f"Apply Failure: {traceback.format_exc()}")
929931
raise e
930932
self.notification_target_manager.notify(
931933
NotificationEvent.APPLY_END, environment=plan.environment.name

sqlmesh/core/scheduler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import logging
4+
import traceback
45
import typing as t
56
from datetime import datetime
67

@@ -181,6 +182,7 @@ def evaluate(
181182
self.notification_target_manager.notify_user(
182183
NotificationEvent.AUDIT_FAILURE, snapshot.node.owner, e
183184
)
185+
logger.error(f"Audit Failure: {traceback.format_exc()}")
184186
raise e
185187
self.state_sync.add_interval(snapshot, start, end, is_dev=not is_deployable)
186188

0 commit comments

Comments
 (0)