SachinyadavAug20 commented on issue #46402:
URL: https://github.com/apache/airflow/issues/46402#issuecomment-6909238045

   Hi @potiuk @pauloenrique071,
   
   I'd like to pick this up and submit a fresh, minimal PR.
   
   I reviewed the previous iteration and review feedback on #56973. My proposed 
implementation keeps the scope strictly focused on resolving the dynamic DAG 
link:
   
   1. **Airflow 3 Execution Time (`task_runner.py`):** Push `trigger_dag_id` 
alongside `trigger_run_id` in `_handle_trigger_dag_run` only *after* a 
successful trigger response. This ensures failure-mode state stays consistent 
across both XComs and prevents ghost values.
   2. **Operator Link (`trigger_dagrun.py`):** In 
`TriggerDagRunLink.get_link()`, check `XCom.get_value(ti_key=ti_key, 
key=XCOM_DAG_ID)` using an explicit `is None` identity check, falling back to 
`operator.trigger_dag_id` if absent. Also push `XCOM_DAG_ID` in 
`_trigger_dag_af_2` for Airflow 2 compatibility.
   3. **Tests:** Update `test_trigger_dagrun.py` and `test_task_runner.py` 
while strictly preserving ordered call assertions (`assert_has_calls`) rather 
than loose matching.
   
   I will open a focused PR shortly!


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