kaxil commented on code in PR #68254:
URL: https://github.com/apache/airflow/pull/68254#discussion_r3376527730


##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1815,7 +1815,17 @@ def _handle_trigger_dag_run(
                 log.error(
                     "DagRun finished with failed state.", 
dag_id=drte.trigger_dag_id, state=comms_msg.state
                 )
-                return _handle_current_task_failed(ti)
+                # Mirror the deferrable path (DagStateTrigger -> 
execute_complete raises
+                # AirflowException), which flows through run()'s exception 
handler and
+                # therefore honours a configured retry_policy. Synthesize the 
same
+                # exception here so non-deferrable waits evaluate the policy 
too,
+                # falling back to the standard retry-count check when none is 
set.
+                return _apply_retry_policy_or_default(

Review Comment:
   In a separate PR, I am going to invert `_handle_current_task_failed` -> 
`_apply_retry_policy_or_default` naming now that everything goes through 
`_apply_retry_policy_or_default`



-- 
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]

Reply via email to