arnoldmr01 commented on code in PR #60810:
URL: https://github.com/apache/airflow/pull/60810#discussion_r2745003478


##########
providers/standard/tests/unit/standard/operators/test_trigger_dagrun.py:
##########
@@ -114,9 +114,7 @@ def test_trigger_dagrun(self):
         """
         with time_machine.travel("2025-02-18T08:04:46Z", tick=False):
             task = TriggerDagRunOperator(
-                task_id="test_task",

Review Comment:
   Yes, we should add one. I will modify it.



##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -288,6 +291,13 @@ def _trigger_dag_af_3(self, context, run_id, 
parsed_logical_date):
             deferrable=self.deferrable,
         )
 
+        if self.note:
+            sig = inspect.signature(DagRunTriggerException.__init__)
+            if "note" in sig.parameters:
+                kwargs_accepted["note"] = self.note

Review Comment:
   Thanks for your suggestion. I will modify it.
   



##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -274,7 +277,7 @@ def execute(self, context: Context):
     def _trigger_dag_af_3(self, context, run_id, parsed_logical_date):
         from airflow.providers.common.compat.sdk import DagRunTriggerException
 
-        raise DagRunTriggerException(
+        kwargs_accepted = dict(

Review Comment:
   First of all, thanks for reviewing my code. Yes, I think `_trigger_dag_af_2` 
should handle `note`. I will modify it by adding a logic to check if 
`self.note` has value. If so, log warning for users.



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