Description
When a snapshot evaluation fails due to an underlying driver or engine error, only the raw exception text is printed. The failing model or snapshot name is missing from the output.
Example
MSSQL via DDBC:
Error: Driver Error: Invalid character value for cast specification; DDBC Error: [Microsoft][SQL Server]Explicit conversion from data type bigint to datetime2 is not allowed.
Expected Behavior
The error output should include the failing model or snapshot name directly, without requiring verbose logging.
This is especially important in CI pipelines where many models may run concurrently.
Context / Suspected Cause
SQLMesh already wraps per-node execution failures in NodeExecutionFailedError. This exception stores the failing node and preserves the original exception through __cause__:
concurrency.py, lines 15-18
concurrency.py, lines 67-85
The scheduler collects these exceptions and passes them to console.log_failed_models(errors):
scheduler.py, lines 615-620
In the observed output, only the raw driver exception is shown, without a model or snapshot identifier. This suggests either:
- The error follows a path that bypasses
log_failed_models.
log_failed_models does not consistently include model context for driver-raised errors.
Suggested Fix
Ensure that every relevant output path, including the CLI, CI output, and log_failed_models in sqlmesh/core/console.py, includes the model or snapshot name from NodeExecutionFailedError.node.
Description
When a snapshot evaluation fails due to an underlying driver or engine error, only the raw exception text is printed. The failing model or snapshot name is missing from the output.
Example
MSSQL via DDBC:
Expected Behavior
The error output should include the failing model or snapshot name directly, without requiring verbose logging.
This is especially important in CI pipelines where many models may run concurrently.
Context / Suspected Cause
SQLMesh already wraps per-node execution failures in
NodeExecutionFailedError. This exception stores the failing node and preserves the original exception through__cause__:concurrency.py, lines 15-18concurrency.py, lines 67-85The scheduler collects these exceptions and passes them to
console.log_failed_models(errors):scheduler.py, lines 615-620In the observed output, only the raw driver exception is shown, without a model or snapshot identifier. This suggests either:
log_failed_models.log_failed_modelsdoes not consistently include model context for driver-raised errors.Suggested Fix
Ensure that every relevant output path, including the CLI, CI output, and
log_failed_modelsinsqlmesh/core/console.py, includes the model or snapshot name fromNodeExecutionFailedError.node.