#19768·datahub

[Airflow Plugin] DAG links construct legacy /tree?dag_id= route instead of /dags/{dag_id}

Author: gnaneshwarbandari-twCreated Sep 15, 2026Updated Sep 18, 2026
LabelsbugFrom Zendeskescalatedescalated-zpingestion-primary-podcs-bug

Describe the bug The acryl-datahub-airflow-plugin constructs external links to Airflow DAGs using the legacy route format (<base_url>/tree?dag_id={dag_id}). In modern Airflow versions (Airflow 2.x and 3.x), the standard webserver route for DAGs is /dags/{dag_id}. This causes links displayed in DataHub to hit legacy endpoints or fail to resolve properly depending on webserver redirect configurations.

To Reproduce Steps to reproduce the behavior:

  1. Ingest DAG metadata from an Airflow 2.x or 3.x cluster using acryl-datahub-airflow-plugin.
  2. Open the DataHub UI and locate an ingested Airflow DAG asset.
  3. Click the external hyperlink to navigate to Airflow.
  4. See the generated URL containing /tree?dag_id=... instead of /dags/....

Expected behavior The Airflow plugin should construct DAG URLs using the modern /dags/{dag_id} path structure.

Screenshots N/A

Desktop (please complete the following information):

  • Airflow version: 3
  • datahub: 1.7.0
  • Version: acryl-datahub-airflow-plugin

Additional context The logic lives in metadata-ingestion-modules/airflow-plugin/src/datahub_airflow_plugin/client/airflow_generator.py:

python
dag_url = f"{base_url}/tree?dag_id={dag_id}"

https://github.com/datahub-project/datahub/blob/46e24b83c49c370c07b7a726b8fb331262fa321a/metadata-ingestion-modules/airflow-plugin/src/datahub_airflow_plugin/client/airflow_generator.py#L205