amankum2004 opened a new pull request, #61899:
URL: https://github.com/apache/airflow/pull/61899
## Problem
The "Triggered DAG" button only appeared **after** the parent task completed
execution. During RUNNING/QUEUED states, the button was completely hidden.
## Solution
This change makes the Triggered DAG button appear as soon as the child DAG
run is created/queued, instead of only after the parent task finishes.
### Changes
* **Added a reusable helper** in task runner to push operator extra-link
XComs:
* `_push_operator_extra_links_to_xcom(...)`
* **In `_handle_trigger_dag_run(...)`**, after pushing `trigger_run_id`, we
now immediately push the `TriggerDagRunLink` XCom:
* `_link_TriggerDagRunLink`
* **Kept existing finalize behavior** by reusing the same helper in
`finalize()`.
### Behavior After This Change
* While task is still running/deferred, once child DAG run is triggered, the
"Triggered DAG" link is already available to the UI
* No behavior change for conflict path (`DAGRUN_ALREADY_EXISTS`)
* No change to task state transitions
## Testing
Updated task-sdk unit tests to expect immediate `_link_TriggerDagRunLink`
XCom write:
* `test_handle_trigger_dag_run`
* `test_handle_trigger_dag_run_wait_for_completion`
<img width="1920" height="855" alt="Screenshot from 2026-02-14 10-04-54"
src="https://github.com/user-attachments/assets/246c2a93-788a-463a-be6b-7c2231400277"
/>
--
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]