RachitSharma2001 commented on code in PR #29406:
URL: https://github.com/apache/airflow/pull/29406#discussion_r1159193888


##########
airflow/models/baseoperator.py:
##########
@@ -767,6 +767,9 @@ def __init__(
         dag = dag or DagContext.get_current_dag()
         task_group = task_group or TaskGroupContext.get_current_task_group(dag)
 
+        if dag is not None and dag.fail_stop and trigger_rule != 
DEFAULT_TRIGGER_RULE:
+            raise DagInvalidTriggerRule()

Review Comment:
   That makes sense. I have added a static `check` method to the 
`DagInvalidTriggerRule` class, which checks the necessary condition and throws 
an exception if needed. Let me know if this was what you had in mind or if 
there is a better possible implementation for this.



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