Skip to content

Commit

Permalink
Add the dag_id to AirflowDagCycleException message (#26204)
Browse files Browse the repository at this point in the history
(cherry picked from commit aada79e)
  • Loading branch information
DavidKatz-il authored and jedcunningham committed Sep 12, 2022
1 parent a10fc9a commit 25f6011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/utils/dag_cycle_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _check_adjacent_tasks(task_id, current_task):
"""Returns first untraversed child task, else None if all tasks traversed."""
for adjacent_task in current_task.get_direct_relative_ids():
if visited[adjacent_task] == CYCLE_IN_PROGRESS:
msg = f"Cycle detected in DAG. Faulty task: {task_id}"
msg = f"Cycle detected in DAG: {dag.dag_id}. Faulty task: {task_id}"
raise AirflowDagCycleException(msg)
elif visited[adjacent_task] == CYCLE_NEW:
return adjacent_task
Expand Down

0 comments on commit 25f6011

Please sign in to comment.