Skip to content

Commit

Permalink
fix: correctly check completion status in run_dag magic (#3878)
Browse files Browse the repository at this point in the history
  • Loading branch information
eakmanrq authored Feb 20, 2025
1 parent 1e84ba5 commit d566301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlmesh/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def run_dag(self, context: Context, line: str) -> None:
"""Evaluate the DAG of models using the built-in scheduler."""
args = parse_argstring(self.run_dag, line)

success = context.run(
completion_status = context.run(
args.environment,
start=args.start,
end=args.end,
Expand All @@ -503,7 +503,7 @@ def run_dag(self, context: Context, line: str) -> None:
exit_on_env_update=args.exit_on_env_update,
no_auto_upstream=args.no_auto_upstream,
)
if not success:
if completion_status.is_failure:
raise SQLMeshError("Error Running DAG. Check logs for details.")

@magic_arguments()
Expand Down

0 comments on commit d566301

Please sign in to comment.