Area: Ingestion Issues
Sub-Area: Airflow Plugin Installation & Dependency Management
Applies to: OSS + Cloud
Issue
Your Airflow DAGs run and succeed, but DataHub gets no DAGs, tasks or lineage from Airflow. The Airflow scheduler and worker logs have the line Failed to import plugin acryl-datahub-airflow-plugin. The traceback under it ends in No module named 'openlineage'.
On Airflow 2, the DAGs page of the Airflow UI shows this error:
Broken plugin: [datahub_airflow_plugin.datahub_plugin] No module named 'openlineage'
You Might Be Asking
- Why are my DAGs running successfully but no lineage or metadata is appearing in DataHub?
- Why does the DataHub Airflow plugin install without errors but send nothing to DataHub?
- How do I install the DataHub Airflow plugin on Google Cloud Composer when the package list does not accept extras?
- Which plugin releases have this problem?
Cause
The plugin needs an OpenLineage package when Airflow loads it. If no OpenLineage package is installed, Airflow marks the plugin as broken and does not run it. Your DAGs still succeed, so the problem shows only in the log.
In acryl-datahub-airflow-plugin 1.3.1.5 through 1.6.0, the OpenLineage packages are only in extras:
-
[airflow2]installsopenlineage-airflow>=1.2.0. -
[airflow3]installsapache-airflow-providers-openlineage>=1.0.0.
If you install one of these releases without the extra, no OpenLineage package is installed. Release 1.3.1.4 installed openlineage-airflow without an extra.
From release 1.6.0.1, the plugin requires Airflow 3 and always installs apache-airflow-providers-openlineage. The [airflow2] extra does not exist in those releases, and [airflow3] adds nothing.
Solution
Use the steps for your Airflow version.
Airflow 3
-
Upgrade to the latest plugin. It needs no extra:
pip install --upgrade 'acryl-datahub-airflow-plugin'
Airflow 2.7 to 2.10
DataHub no longer supports Airflow 2.x. Plugin 1.6.0 is the last release that runs on it, and it gets no more fixes. These steps keep an existing install working until you move to Airflow 3.
-
Pin the plugin to 1.6.0 or lower and add the
[airflow2]extra:pip install 'acryl-datahub-airflow-plugin[airflow2]<=1.6.0' -
If your package list does not accept extras, for example the PyPI packages list in Google Cloud Composer, add two entries:
acryl-datahub-airflow-plugin<=1.6.0 openlineage-airflow>=1.2.0
Always pin the plugin on Airflow 2. An unpinned install selects a release that requires Airflow 3. Then pip upgrades Airflow to 3, or the install fails.
To get plugin fixes and new features, move to Airflow 3.
Check the fix
- Restart the Airflow scheduler and workers. On Composer, wait for the environment update to finish.
- Check that the logs have no
Failed to import plugin acryl-datahub-airflow-pluginline, and that the Airflow UI shows noBroken pluginerror. - In the Airflow UI, go to Admin > Plugins and check that the DataHub plugin is listed.
- Run a DAG. Check that the DAG, its tasks and its lineage show in DataHub.
The install steps and the full version table are in Airflow Integration: Compatibility.
Related Documentation
- Airflow Integration: Installation
- Airflow Integration: Compatibility
- Airflow Integration: Missing lineage
- Airflow plugin changelog, version 1.6.0.1
Tags: airflow-plugin, openlineage, silent-failure, broken-plugin, cloud-composer, airflow2, ingestion, dependency, installation, lineage