uranusjr commented on code in PR #34619:
URL: https://github.com/apache/airflow/pull/34619#discussion_r1338060955
##########
airflow/models/dag.py:
##########
@@ -2828,7 +2842,15 @@ def add_logger_if_needed(ti: TaskInstance):
try:
add_logger_if_needed(ti)
ti.task = tasks[ti.task_id]
- _run_task(ti, session=session)
+ ret = _run_task(ti, session=session)
+ if ret is TaskReturnCode.DEFERRED:
+ if not _triggerer_is_healthy():
+ raise _StopDagTest(
+ "Task has deferred but triggerer component is
not running. "
+ "You can start the triggerer by running
`airflow triggerer` in a terminal."
+ )
+ except _StopDagTest:
+ raise
Review Comment:
What does this block do? If this simply reraise there’s no point catching
this in the first place.
##########
airflow/models/dag.py:
##########
@@ -2828,7 +2842,15 @@ def add_logger_if_needed(ti: TaskInstance):
try:
add_logger_if_needed(ti)
ti.task = tasks[ti.task_id]
- _run_task(ti, session=session)
+ ret = _run_task(ti, session=session)
+ if ret is TaskReturnCode.DEFERRED:
+ if not _triggerer_is_healthy():
+ raise _StopDagTest(
+ "Task has deferred but triggerer component is
not running. "
+ "You can start the triggerer by running
`airflow triggerer` in a terminal."
+ )
+ except _StopDagTest:
+ raise
Review Comment:
What does this block do? If this simply reraise there’s no point catching
this in the first place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]