Skip to content

Commit d566301

Browse files
authored
fix: correctly check completion status in run_dag magic (#3878)
1 parent 1e84ba5 commit d566301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmesh/magics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def run_dag(self, context: Context, line: str) -> None:
493493
"""Evaluate the DAG of models using the built-in scheduler."""
494494
args = parse_argstring(self.run_dag, line)
495495

496-
success = context.run(
496+
completion_status = context.run(
497497
args.environment,
498498
start=args.start,
499499
end=args.end,
@@ -503,7 +503,7 @@ def run_dag(self, context: Context, line: str) -> None:
503503
exit_on_env_update=args.exit_on_env_update,
504504
no_auto_upstream=args.no_auto_upstream,
505505
)
506-
if not success:
506+
if completion_status.is_failure:
507507
raise SQLMeshError("Error Running DAG. Check logs for details.")
508508

509509
@magic_arguments()

0 commit comments

Comments
 (0)