arnoldmr01 commented on PR #60810:
URL: https://github.com/apache/airflow/pull/60810#issuecomment-3813988597

   Finished testing via running actual Dag to trigger the other Dags through 
TriggerDagRunOperator.
   The following are the code snippets I used to test:
   `note_trigger`
   ```
   from __future__ import annotations
   
   from airflow import DAG
   from airflow.providers.standard.operators.trigger_dagrun import 
TriggerDagRunOperator
   from pendulum import datetime
   
   with DAG(
       dag_id="note_trigger",
       start_date=datetime(2024, 1, 1),
       schedule=None,
       catchup=False,
   ) as dag:
       TriggerDagRunOperator(
           task_id="trigger",
           trigger_dag_id="note_trigger2",
           conf={"hello": "airflow"},
           note="Test Note for Note_Tirgger2",
           wait_for_completion=False,
       )
   ```
   `note_trigger2`
   ```
   from __future__ import annotations
   
   from airflow import DAG
   from airflow.providers.standard.operators.trigger_dagrun import 
TriggerDagRunOperator
   from pendulum import datetime
   
   with DAG(
       dag_id="note_trigger2",
       start_date=datetime(2024, 1, 1),
       schedule=None,
       catchup=False,
   ) as dag:
       TriggerDagRunOperator(
           task_id="trigger",
           trigger_dag_id="note_target",
           conf={"hello": "columbus"},
           note="Test Note for Note_Target",   
           wait_for_completion=False,
       )
   
   ```
   `note_target`
   ```
   from __future__ import annotations
   
   from airflow import DAG
   from airflow.providers.standard.operators.empty import EmptyOperator
   from pendulum import datetime
   
   with DAG(
       dag_id="note_target",
       start_date=datetime(2024, 1, 1),
       schedule=None,
       catchup=False,
   ) as dag:
       EmptyOperator(task_id="start")
   
   ```
   
   The workflow should be: note_trigger -> note_trigger2 -> note_target, and 
the note in note_trigger should pass to note_trigger2 and the note in 
note_trigger2 should pass to note_target.
   
   Since airflow2.11.0 and airflow3.1.6 do not have the logic to handle note 
information passing from the TriggerDagRunOperator, they cannot store the note 
info. This PR version support this feature. The following is the results:
   
   <img width="771" height="657" alt="Screenshot 2026-01-28 at 4 17 27 PM" 
src="https://github.com/user-attachments/assets/e0b97578-4825-40f6-8e4e-362e0ddc4161";
 />


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