[Airflow Plugin] DAG links construct legacy /tree?dag_id= route instead of /dags/{dag_id}
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:
- Ingest DAG metadata from an Airflow 2.x or 3.x cluster using
acryl-datahub-airflow-plugin. - Open the DataHub UI and locate an ingested Airflow DAG asset.
- Click the external hyperlink to navigate to Airflow.
- 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:
dag_url = f"{base_url}/tree?dag_id={dag_id}"Source: datahub-project/datahub