Mr-Neutr0n opened a new pull request, #61852: URL: https://github.com/apache/airflow/pull/61852
**closes: #61850** When `ExternalTaskSensor` uses `execution_delta` or `execution_date_fn` to wait for a DAG run with a different logical date, the "External DAG" link in the UI points to a non-existent run. This happens because the link was built using the *current* DAG run's `run_id` (which embeds the current logical date) instead of the *external* DAG's actual `run_id`. For example, if DAG2 (scheduled at `22:35`) uses an `ExternalTaskSensor` with `execution_delta` to wait on DAG1 (scheduled at `22:30`), the link would incorrectly point to `/dags/dag1/runs/scheduled__2026-02-11T22:35:00+00:00` instead of the correct `/dags/dag1/runs/scheduled__2026-02-11T22:30:00+00:00`. ### Changes Added `ExternalDagLink._resolve_external_run_id()` which: 1. Looks up the current DAG run to get its logical date 2. Applies `execution_delta` if set to compute the target logical date 3. Queries for the external DAG run with that logical date to get its actual run_id 4. Falls back to the previous behavior (using the current run_id) if the lookup fails This fix applies to both the Airflow 2.x and 3.x code paths. -- 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]
