apache-airflow-providers-openlineage 2.2.0__tar.gz → 2.3.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/PKG-INFO +10 -10
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/README.rst +4 -4
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/changelog.rst +31 -0
- apache_airflow_providers_openlineage-2.3.0rc1/docs/commits.rst +35 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/index.rst +5 -5
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/provider.yaml +5 -1
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/pyproject.toml +6 -6
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/__init__.py +3 -3
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/extractors/base.py +4 -1
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/adapter.py +0 -36
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/listener.py +12 -41
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/macros.py +42 -15
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/openlineage.py +2 -4
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/utils/spark.py +5 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/utils/utils.py +51 -11
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/version_compat.py +0 -1
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/conftest.py +1 -1
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/example_openlineage.json +2 -8
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/example_openlineage.py +0 -3
- apache_airflow_providers_openlineage-2.3.0rc1/tests/system/openlineage/example_openlineage_defer.json +38 -0
- apache_airflow_providers_openlineage-2.2.0/tests/system/openlineage/example_openlineage_mapped_sensor.py → apache_airflow_providers_openlineage-2.3.0rc1/tests/system/openlineage/example_openlineage_defer.py +10 -24
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/operator.py +36 -15
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/transport/variable.py +11 -1
- apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/dags/test_openlineage_execution.py +69 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/extractors/test_manager.py +17 -168
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_adapter.py +100 -18
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_execution.py +9 -28
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_listener.py +63 -46
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_utils.py +6 -102
- apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/utils/__init__.py +16 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/utils/test_spark.py +7 -1
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/utils/test_utils.py +117 -18
- apache_airflow_providers_openlineage-2.2.0/docs/commits.rst +0 -638
- apache_airflow_providers_openlineage-2.2.0/tests/system/openlineage/example_openlineage_mapped_sensor.json +0 -75
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/conf.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/configurations-ref.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/guides/developer.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/guides/structure.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/guides/user.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/integration-logos/openlineage.svg +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/macros.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/security.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/docs/supported_classes.rst +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/LICENSE +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/conf.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/extractors/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/extractors/bash.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/extractors/manager.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/extractors/python.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/AirflowDagRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/AirflowDebugRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/AirflowJobFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/AirflowRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/AirflowStateRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/facets/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/get_provider_info.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/plugins/facets.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/sqlparser.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/utils/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/utils/selective_enable.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/src/airflow/providers/openlineage/utils/sql.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/conftest.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/integration/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/integration/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/integration/openlineage/operators/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/system/openlineage/transport/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0/tests/unit/openlineage/extractors → apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/dags}/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0/tests/unit/openlineage/plugins → apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/extractors}/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/extractors/test_base.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/extractors/test_bash.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/extractors/test_python.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/log_config.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0/tests/unit/openlineage/plugins/openlineage_configs → apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/plugins}/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0/tests/unit/openlineage/utils → apache_airflow_providers_openlineage-2.3.0rc1/tests/unit/openlineage/plugins/openlineage_configs}/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/openlineage_configs/http.yaml +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_facets.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_macros.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/plugins/test_openlineage.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/test_conf.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/test_sqlparser.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/utils/custom_facet_fixture.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/utils/test_selective_enable.py +0 -0
- {apache_airflow_providers_openlineage-2.2.0 → apache_airflow_providers_openlineage-2.3.0rc1}/tests/unit/openlineage/utils/test_sql.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-openlineage for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,openlineage,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -20,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
Requires-Dist: apache-airflow>=2.
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.20.
|
|
25
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.4.
|
|
23
|
+
Requires-Dist: apache-airflow>=2.10.0rc1
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc1
|
|
25
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.4.0rc1
|
|
26
26
|
Requires-Dist: attrs>=22.2
|
|
27
27
|
Requires-Dist: openlineage-integration-common>=1.31.0
|
|
28
28
|
Requires-Dist: openlineage-python>=1.31.0
|
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
30
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
30
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/changelog.html
|
|
31
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.3.0
|
|
32
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -59,7 +59,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
59
59
|
|
|
60
60
|
Package ``apache-airflow-providers-openlineage``
|
|
61
61
|
|
|
62
|
-
Release: ``2.
|
|
62
|
+
Release: ``2.3.0``
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -72,7 +72,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
72
72
|
are in ``airflow.providers.openlineage`` python package.
|
|
73
73
|
|
|
74
74
|
You can find package information and changelog for the provider
|
|
75
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
75
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/>`_.
|
|
76
76
|
|
|
77
77
|
Installation
|
|
78
78
|
------------
|
|
@@ -89,7 +89,7 @@ Requirements
|
|
|
89
89
|
========================================== ==================
|
|
90
90
|
PIP package Version required
|
|
91
91
|
========================================== ==================
|
|
92
|
-
``apache-airflow`` ``>=2.
|
|
92
|
+
``apache-airflow`` ``>=2.10.0``
|
|
93
93
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
94
94
|
``apache-airflow-providers-common-compat`` ``>=1.4.0``
|
|
95
95
|
``attrs`` ``>=22.2``
|
|
@@ -118,5 +118,5 @@ Dependent package
|
|
|
118
118
|
================================================================================================================== =================
|
|
119
119
|
|
|
120
120
|
The changelog for the provider package can be found in the
|
|
121
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
121
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/changelog.html>`_.
|
|
122
122
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-openlineage``
|
|
25
25
|
|
|
26
|
-
Release: ``2.
|
|
26
|
+
Release: ``2.3.0``
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -36,7 +36,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
36
36
|
are in ``airflow.providers.openlineage`` python package.
|
|
37
37
|
|
|
38
38
|
You can find package information and changelog for the provider
|
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/>`_.
|
|
40
40
|
|
|
41
41
|
Installation
|
|
42
42
|
------------
|
|
@@ -53,7 +53,7 @@ Requirements
|
|
|
53
53
|
========================================== ==================
|
|
54
54
|
PIP package Version required
|
|
55
55
|
========================================== ==================
|
|
56
|
-
``apache-airflow`` ``>=2.
|
|
56
|
+
``apache-airflow`` ``>=2.10.0``
|
|
57
57
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
58
58
|
``apache-airflow-providers-common-compat`` ``>=1.4.0``
|
|
59
59
|
``attrs`` ``>=22.2``
|
|
@@ -82,4 +82,4 @@ Dependent package
|
|
|
82
82
|
================================================================================================================== =================
|
|
83
83
|
|
|
84
84
|
The changelog for the provider package can be found in the
|
|
85
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
85
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/changelog.html>`_.
|
|
@@ -26,6 +26,37 @@
|
|
|
26
26
|
Changelog
|
|
27
27
|
---------
|
|
28
28
|
|
|
29
|
+
2.3.0
|
|
30
|
+
.....
|
|
31
|
+
|
|
32
|
+
.. note::
|
|
33
|
+
This release of provider is only available for Airflow 2.10+ as explained in the
|
|
34
|
+
Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>_.
|
|
35
|
+
|
|
36
|
+
Features
|
|
37
|
+
~~~~~~~~
|
|
38
|
+
|
|
39
|
+
* ``add root parent information to OpenLineage events (#49237)``
|
|
40
|
+
* ``feat: Add DAG versioning information to OpenLineage events (#48741)``
|
|
41
|
+
* ``Improve execution time messages for DAG or Task not found (#49352)``
|
|
42
|
+
|
|
43
|
+
Misc
|
|
44
|
+
~~~~
|
|
45
|
+
|
|
46
|
+
* ``Remove AIRFLOW_2_10_PLUS conditions (#49877)``
|
|
47
|
+
* ``Bump min Airflow version in providers to 2.10 (#49843)``
|
|
48
|
+
* ``nit: Remove duplicate warning when no OL metadata returned (#50350)``
|
|
49
|
+
|
|
50
|
+
.. Below changes are excluded from the changelog. Move them to
|
|
51
|
+
appropriate section above if needed. Do not delete the lines(!):
|
|
52
|
+
* ``tests: Fix clearing Variables for OpenLineage system tests (#50234)``
|
|
53
|
+
* ``Update description of provider.yaml dependencies (#50231)``
|
|
54
|
+
* ``Bump openlineage provider (#50230)``
|
|
55
|
+
* ``Avoid committing history for providers (#49907)``
|
|
56
|
+
* ``tests: Fix OpenLineage VariableTransport's initialization (#49550)``
|
|
57
|
+
* ``Delete duplicate 'mock_supervisor_comms' pytest fixtures from OL provider (#49520)``
|
|
58
|
+
* ``Remove redundant fixtures in OL provider (#49357)``
|
|
59
|
+
|
|
29
60
|
2.2.0
|
|
30
61
|
.....
|
|
31
62
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
18
|
+
|
|
19
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
20
|
+
|
|
21
|
+
.. IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
22
|
+
`PROVIDER_COMMITS_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
23
|
+
|
|
24
|
+
.. THE REMAINDER OF THE FILE IS AUTOMATICALLY GENERATED. IT WILL BE OVERWRITTEN!
|
|
25
|
+
|
|
26
|
+
Package apache-airflow-providers-openlineage
|
|
27
|
+
------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
`OpenLineage <https://openlineage.io/>`__
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
This is detailed commit list of changes for versions provider package: ``openlineage``.
|
|
33
|
+
For high-level changelog, see :doc:`package information including changelog <index>`.
|
|
34
|
+
|
|
35
|
+
.. airflow-providers-commits::
|
|
@@ -81,7 +81,7 @@ apache-airflow-providers-openlineage package
|
|
|
81
81
|
`OpenLineage <https://openlineage.io/>`__
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
Release: 2.
|
|
84
|
+
Release: 2.3.0
|
|
85
85
|
|
|
86
86
|
Provider package
|
|
87
87
|
----------------
|
|
@@ -99,12 +99,12 @@ For the minimum Airflow version supported, see ``Requirements`` below.
|
|
|
99
99
|
Requirements
|
|
100
100
|
------------
|
|
101
101
|
|
|
102
|
-
The minimum Apache Airflow version supported by this provider distribution is ``2.
|
|
102
|
+
The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
|
|
103
103
|
|
|
104
104
|
========================================== ==================
|
|
105
105
|
PIP package Version required
|
|
106
106
|
========================================== ==================
|
|
107
|
-
``apache-airflow`` ``>=2.
|
|
107
|
+
``apache-airflow`` ``>=2.10.0``
|
|
108
108
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
109
109
|
``apache-airflow-providers-common-compat`` ``>=1.4.0``
|
|
110
110
|
``attrs`` ``>=22.2``
|
|
@@ -138,5 +138,5 @@ Downloading official packages
|
|
|
138
138
|
You can download officially released packages and verify their checksums and signatures from the
|
|
139
139
|
`Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
|
|
140
140
|
|
|
141
|
-
* `The apache-airflow-providers-openlineage 2.
|
|
142
|
-
* `The apache-airflow-providers-openlineage 2.
|
|
141
|
+
* `The apache-airflow-providers-openlineage 2.3.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0.tar.gz.sha512>`__)
|
|
142
|
+
* `The apache-airflow-providers-openlineage 2.3.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.3.0-py3-none-any.whl.sha512>`__)
|
|
@@ -23,8 +23,12 @@ description: |
|
|
|
23
23
|
|
|
24
24
|
state: ready
|
|
25
25
|
source-date-epoch: 1744792298
|
|
26
|
-
#
|
|
26
|
+
# Note that those versions are maintained by release manager - do not update them manually
|
|
27
|
+
# with the exception of case where other provider in sources has >= new provider version.
|
|
28
|
+
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
|
29
|
+
# to be done in the same PR
|
|
27
30
|
versions:
|
|
31
|
+
- 2.3.0
|
|
28
32
|
- 2.2.0
|
|
29
33
|
- 2.1.3
|
|
30
34
|
- 2.1.2
|
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-openlineage"
|
|
28
|
-
version = "2.
|
|
28
|
+
version = "2.3.0rc1"
|
|
29
29
|
description = "Provider package apache-airflow-providers-openlineage for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -57,9 +57,9 @@ requires-python = "~=3.9"
|
|
|
57
57
|
# Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
|
|
58
58
|
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
|
|
59
59
|
dependencies = [
|
|
60
|
-
"apache-airflow>=2.
|
|
61
|
-
"apache-airflow-providers-common-sql>=1.20.
|
|
62
|
-
"apache-airflow-providers-common-compat>=1.4.
|
|
60
|
+
"apache-airflow>=2.10.0rc1",
|
|
61
|
+
"apache-airflow-providers-common-sql>=1.20.0rc1",
|
|
62
|
+
"apache-airflow-providers-common-compat>=1.4.0rc1",
|
|
63
63
|
"attrs>=22.2",
|
|
64
64
|
"openlineage-integration-common>=1.31.0",
|
|
65
65
|
"openlineage-python>=1.31.0",
|
|
@@ -105,8 +105,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
|
105
105
|
apache-airflow-providers-standard = {workspace = true}
|
|
106
106
|
|
|
107
107
|
[project.urls]
|
|
108
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
109
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.
|
|
108
|
+
"Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.3.0"
|
|
109
|
+
"Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.3.0/changelog.html"
|
|
110
110
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
111
111
|
"Source Code" = "https://github.com/apache/airflow"
|
|
112
112
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "2.
|
|
32
|
+
__version__ = "2.3.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
|
-
"2.
|
|
35
|
+
"2.10.0"
|
|
36
36
|
):
|
|
37
37
|
raise RuntimeError(
|
|
38
|
-
f"The package `apache-airflow-providers-openlineage:{__version__}` needs Apache Airflow 2.
|
|
38
|
+
f"The package `apache-airflow-providers-openlineage:{__version__}` needs Apache Airflow 2.10.0+"
|
|
39
39
|
)
|
|
@@ -138,7 +138,10 @@ class DefaultExtractor(BaseExtractor):
|
|
|
138
138
|
|
|
139
139
|
def _get_openlineage_facets(self, get_facets_method, *args) -> OperatorLineage | None:
|
|
140
140
|
try:
|
|
141
|
-
facets: OperatorLineage = get_facets_method(*args)
|
|
141
|
+
facets: OperatorLineage | None = get_facets_method(*args)
|
|
142
|
+
if facets is None:
|
|
143
|
+
self.log.debug("OpenLineage method returned `None`")
|
|
144
|
+
return None
|
|
142
145
|
# "rewrite" OperatorLineage to safeguard against different version of the same class
|
|
143
146
|
# that was existing in openlineage-airflow package outside of Airflow repo
|
|
144
147
|
return OperatorLineage(
|
|
@@ -32,7 +32,6 @@ from openlineage.client.facet_v2 import (
|
|
|
32
32
|
job_type_job,
|
|
33
33
|
nominal_time_run,
|
|
34
34
|
ownership_job,
|
|
35
|
-
parent_run,
|
|
36
35
|
source_code_location_job,
|
|
37
36
|
)
|
|
38
37
|
from openlineage.client.uuid import generate_static_uuid
|
|
@@ -188,8 +187,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
188
187
|
job_name: str,
|
|
189
188
|
job_description: str,
|
|
190
189
|
event_time: str,
|
|
191
|
-
parent_job_name: str | None,
|
|
192
|
-
parent_run_id: str | None,
|
|
193
190
|
code_location: str | None,
|
|
194
191
|
nominal_start_time: str | None,
|
|
195
192
|
nominal_end_time: str | None,
|
|
@@ -204,9 +201,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
204
201
|
:param job_name: globally unique identifier of task in dag
|
|
205
202
|
:param job_description: user provided description of job
|
|
206
203
|
:param event_time:
|
|
207
|
-
:param parent_job_name: the name of the parent job (typically the DAG,
|
|
208
|
-
but possibly a task group)
|
|
209
|
-
:param parent_run_id: identifier of job spawning this task
|
|
210
204
|
:param code_location: file path or URL of DAG file
|
|
211
205
|
:param nominal_start_time: scheduled time of dag run
|
|
212
206
|
:param nominal_end_time: following schedule of dag run
|
|
@@ -223,9 +217,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
223
217
|
eventTime=event_time,
|
|
224
218
|
run=self._build_run(
|
|
225
219
|
run_id=run_id,
|
|
226
|
-
job_name=job_name,
|
|
227
|
-
parent_job_name=parent_job_name,
|
|
228
|
-
parent_run_id=parent_run_id,
|
|
229
220
|
nominal_start_time=nominal_start_time,
|
|
230
221
|
nominal_end_time=nominal_end_time,
|
|
231
222
|
run_facets=run_facets,
|
|
@@ -248,8 +239,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
248
239
|
self,
|
|
249
240
|
run_id: str,
|
|
250
241
|
job_name: str,
|
|
251
|
-
parent_job_name: str | None,
|
|
252
|
-
parent_run_id: str | None,
|
|
253
242
|
end_time: str,
|
|
254
243
|
task: OperatorLineage,
|
|
255
244
|
run_facets: dict[str, RunFacet] | None = None,
|
|
@@ -259,9 +248,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
259
248
|
|
|
260
249
|
:param run_id: globally unique identifier of task in dag run
|
|
261
250
|
:param job_name: globally unique identifier of task between dags
|
|
262
|
-
:param parent_job_name: the name of the parent job (typically the DAG,
|
|
263
|
-
but possibly a task group)
|
|
264
|
-
:param parent_run_id: identifier of job spawning this task
|
|
265
251
|
:param end_time: time of task completion
|
|
266
252
|
:param task: metadata container with information extracted from operator
|
|
267
253
|
:param run_facets: additional run facets
|
|
@@ -275,9 +261,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
275
261
|
eventTime=end_time,
|
|
276
262
|
run=self._build_run(
|
|
277
263
|
run_id=run_id,
|
|
278
|
-
job_name=job_name,
|
|
279
|
-
parent_job_name=parent_job_name,
|
|
280
|
-
parent_run_id=parent_run_id,
|
|
281
264
|
run_facets=run_facets,
|
|
282
265
|
),
|
|
283
266
|
job=self._build_job(job_name, job_type=_JOB_TYPE_TASK, job_facets=task.job_facets),
|
|
@@ -291,8 +274,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
291
274
|
self,
|
|
292
275
|
run_id: str,
|
|
293
276
|
job_name: str,
|
|
294
|
-
parent_job_name: str | None,
|
|
295
|
-
parent_run_id: str | None,
|
|
296
277
|
end_time: str,
|
|
297
278
|
task: OperatorLineage,
|
|
298
279
|
error: str | BaseException | None = None,
|
|
@@ -303,9 +284,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
303
284
|
|
|
304
285
|
:param run_id: globally unique identifier of task in dag run
|
|
305
286
|
:param job_name: globally unique identifier of task between dags
|
|
306
|
-
:param parent_job_name: the name of the parent job (typically the DAG,
|
|
307
|
-
but possibly a task group)
|
|
308
|
-
:param parent_run_id: identifier of job spawning this task
|
|
309
287
|
:param end_time: time of task completion
|
|
310
288
|
:param task: metadata container with information extracted from operator
|
|
311
289
|
:param run_facets: custom run facets
|
|
@@ -332,9 +310,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
332
310
|
eventTime=end_time,
|
|
333
311
|
run=self._build_run(
|
|
334
312
|
run_id=run_id,
|
|
335
|
-
job_name=job_name,
|
|
336
|
-
parent_job_name=parent_job_name,
|
|
337
|
-
parent_run_id=parent_run_id,
|
|
338
313
|
run_facets=run_facets,
|
|
339
314
|
),
|
|
340
315
|
job=self._build_job(job_name, job_type=_JOB_TYPE_TASK, job_facets=task.job_facets),
|
|
@@ -372,7 +347,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
372
347
|
run_id=self.build_dag_run_id(
|
|
373
348
|
dag_id=dag_id, logical_date=logical_date, clear_number=clear_number
|
|
374
349
|
),
|
|
375
|
-
job_name=dag_id,
|
|
376
350
|
nominal_start_time=nominal_start_time,
|
|
377
351
|
nominal_end_time=nominal_end_time,
|
|
378
352
|
run_facets={**run_facets, **get_airflow_debug_facet(), **get_processing_engine_facet()},
|
|
@@ -473,9 +447,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
473
447
|
@staticmethod
|
|
474
448
|
def _build_run(
|
|
475
449
|
run_id: str,
|
|
476
|
-
job_name: str,
|
|
477
|
-
parent_job_name: str | None = None,
|
|
478
|
-
parent_run_id: str | None = None,
|
|
479
450
|
nominal_start_time: str | None = None,
|
|
480
451
|
nominal_end_time: str | None = None,
|
|
481
452
|
run_facets: dict[str, RunFacet] | None = None,
|
|
@@ -485,13 +456,6 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
485
456
|
facets.update(
|
|
486
457
|
{"nominalTime": nominal_time_run.NominalTimeRunFacet(nominal_start_time, nominal_end_time)}
|
|
487
458
|
)
|
|
488
|
-
if parent_run_id:
|
|
489
|
-
parent_run_facet = parent_run.ParentRunFacet(
|
|
490
|
-
run=parent_run.Run(runId=parent_run_id),
|
|
491
|
-
job=parent_run.Job(namespace=conf.namespace(), name=parent_job_name or job_name),
|
|
492
|
-
)
|
|
493
|
-
facets.update({"parent": parent_run_facet})
|
|
494
|
-
|
|
495
459
|
if run_facets:
|
|
496
460
|
facets.update(run_facets)
|
|
497
461
|
|
|
@@ -33,7 +33,6 @@ from airflow.providers.openlineage import conf
|
|
|
33
33
|
from airflow.providers.openlineage.extractors import ExtractorManager, OperatorLineage
|
|
34
34
|
from airflow.providers.openlineage.plugins.adapter import OpenLineageAdapter, RunState
|
|
35
35
|
from airflow.providers.openlineage.utils.utils import (
|
|
36
|
-
AIRFLOW_V_2_10_PLUS,
|
|
37
36
|
AIRFLOW_V_3_0_PLUS,
|
|
38
37
|
get_airflow_dag_run_facet,
|
|
39
38
|
get_airflow_debug_facet,
|
|
@@ -41,6 +40,7 @@ from airflow.providers.openlineage.utils.utils import (
|
|
|
41
40
|
get_airflow_mapped_task_facet,
|
|
42
41
|
get_airflow_run_facet,
|
|
43
42
|
get_job_name,
|
|
43
|
+
get_task_parent_run_facet,
|
|
44
44
|
get_user_provided_run_facets,
|
|
45
45
|
is_operator_disabled,
|
|
46
46
|
is_selective_lineage_enabled,
|
|
@@ -59,13 +59,6 @@ if TYPE_CHECKING:
|
|
|
59
59
|
_openlineage_listener: OpenLineageListener | None = None
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def _get_try_number_success(val):
|
|
63
|
-
# todo: remove when min airflow version >= 2.10.0
|
|
64
|
-
if AIRFLOW_V_2_10_PLUS:
|
|
65
|
-
return val.try_number
|
|
66
|
-
return val.try_number - 1
|
|
67
|
-
|
|
68
|
-
|
|
69
62
|
def _executor_initializer():
|
|
70
63
|
"""
|
|
71
64
|
Initialize processes for the executor used with DAGRun listener's methods (on scheduler).
|
|
@@ -209,14 +202,13 @@ class OpenLineageListener:
|
|
|
209
202
|
job_name=get_job_name(task),
|
|
210
203
|
job_description=dag.description,
|
|
211
204
|
event_time=start_date.isoformat(),
|
|
212
|
-
parent_job_name=dag.dag_id,
|
|
213
|
-
parent_run_id=parent_run_id,
|
|
214
205
|
code_location=None,
|
|
215
206
|
nominal_start_time=data_interval_start,
|
|
216
207
|
nominal_end_time=data_interval_end,
|
|
217
208
|
owners=dag.owner.split(", "),
|
|
218
209
|
task=task_metadata,
|
|
219
210
|
run_facets={
|
|
211
|
+
**get_task_parent_run_facet(parent_run_id=parent_run_id, parent_job_name=dag.dag_id),
|
|
220
212
|
**get_user_provided_run_facets(task_instance, TaskInstanceState.RUNNING),
|
|
221
213
|
**get_airflow_mapped_task_facet(task_instance),
|
|
222
214
|
**get_airflow_run_facet(dagrun, dag, task_instance, task, task_uuid),
|
|
@@ -304,7 +296,7 @@ class OpenLineageListener:
|
|
|
304
296
|
task_uuid = self.adapter.build_task_instance_run_id(
|
|
305
297
|
dag_id=dag.dag_id,
|
|
306
298
|
task_id=task.task_id,
|
|
307
|
-
try_number=
|
|
299
|
+
try_number=task_instance.try_number,
|
|
308
300
|
logical_date=date,
|
|
309
301
|
map_index=task_instance.map_index,
|
|
310
302
|
)
|
|
@@ -322,11 +314,10 @@ class OpenLineageListener:
|
|
|
322
314
|
redacted_event = self.adapter.complete_task(
|
|
323
315
|
run_id=task_uuid,
|
|
324
316
|
job_name=get_job_name(task),
|
|
325
|
-
parent_job_name=dag.dag_id,
|
|
326
|
-
parent_run_id=parent_run_id,
|
|
327
317
|
end_time=end_date.isoformat(),
|
|
328
318
|
task=task_metadata,
|
|
329
319
|
run_facets={
|
|
320
|
+
**get_task_parent_run_facet(parent_run_id=parent_run_id, parent_job_name=dag.dag_id),
|
|
330
321
|
**get_user_provided_run_facets(task_instance, TaskInstanceState.SUCCESS),
|
|
331
322
|
**get_airflow_run_facet(dagrun, dag, task_instance, task, task_uuid),
|
|
332
323
|
**get_airflow_debug_facet(),
|
|
@@ -366,8 +357,7 @@ class OpenLineageListener:
|
|
|
366
357
|
dagrun = context["dag_run"]
|
|
367
358
|
dag = context["dag"]
|
|
368
359
|
self._on_task_instance_failed(task_instance, dag, dagrun, task, error)
|
|
369
|
-
|
|
370
|
-
elif AIRFLOW_V_2_10_PLUS:
|
|
360
|
+
else:
|
|
371
361
|
|
|
372
362
|
@hookimpl
|
|
373
363
|
def on_task_instance_failed(
|
|
@@ -382,19 +372,6 @@ class OpenLineageListener:
|
|
|
382
372
|
if TYPE_CHECKING:
|
|
383
373
|
assert task
|
|
384
374
|
self._on_task_instance_failed(task_instance, task.dag, task_instance.dag_run, task, error)
|
|
385
|
-
else:
|
|
386
|
-
|
|
387
|
-
@hookimpl
|
|
388
|
-
def on_task_instance_failed(
|
|
389
|
-
self,
|
|
390
|
-
previous_state: TaskInstanceState,
|
|
391
|
-
task_instance: TaskInstance,
|
|
392
|
-
session: Session, # type: ignore[valid-type]
|
|
393
|
-
) -> None:
|
|
394
|
-
task = task_instance.task
|
|
395
|
-
if TYPE_CHECKING:
|
|
396
|
-
assert task
|
|
397
|
-
self._on_task_instance_failed(task_instance, task.dag, task_instance.dag_run, task)
|
|
398
375
|
|
|
399
376
|
def _on_task_instance_failed(
|
|
400
377
|
self,
|
|
@@ -456,12 +433,11 @@ class OpenLineageListener:
|
|
|
456
433
|
redacted_event = self.adapter.fail_task(
|
|
457
434
|
run_id=task_uuid,
|
|
458
435
|
job_name=get_job_name(task),
|
|
459
|
-
parent_job_name=dag.dag_id,
|
|
460
|
-
parent_run_id=parent_run_id,
|
|
461
436
|
end_time=end_date.isoformat(),
|
|
462
437
|
task=task_metadata,
|
|
463
438
|
error=error,
|
|
464
439
|
run_facets={
|
|
440
|
+
**get_task_parent_run_facet(parent_run_id=parent_run_id, parent_job_name=dag.dag_id),
|
|
465
441
|
**get_user_provided_run_facets(task_instance, TaskInstanceState.FAILED),
|
|
466
442
|
**get_airflow_run_facet(dagrun, dag, task_instance, task, task_uuid),
|
|
467
443
|
**get_airflow_debug_facet(),
|
|
@@ -504,11 +480,12 @@ class OpenLineageListener:
|
|
|
504
480
|
adapter_kwargs = {
|
|
505
481
|
"run_id": task_uuid,
|
|
506
482
|
"job_name": get_job_name(ti),
|
|
507
|
-
"parent_job_name": dagrun.dag_id,
|
|
508
|
-
"parent_run_id": parent_run_id,
|
|
509
483
|
"end_time": end_date.isoformat(),
|
|
510
484
|
"task": OperatorLineage(),
|
|
511
|
-
"run_facets":
|
|
485
|
+
"run_facets": {
|
|
486
|
+
**get_task_parent_run_facet(parent_run_id=parent_run_id, parent_job_name=ti.dag_id),
|
|
487
|
+
**get_airflow_debug_facet(),
|
|
488
|
+
},
|
|
512
489
|
}
|
|
513
490
|
|
|
514
491
|
if ti_state == TaskInstanceState.FAILED:
|
|
@@ -651,10 +628,7 @@ class OpenLineageListener:
|
|
|
651
628
|
self.log.debug("Executor have not started before `on_dag_run_success`")
|
|
652
629
|
return
|
|
653
630
|
|
|
654
|
-
|
|
655
|
-
task_ids = DagRun._get_partial_task_ids(dag_run.dag)
|
|
656
|
-
else:
|
|
657
|
-
task_ids = dag_run.dag.task_ids if dag_run.dag and dag_run.dag.partial else None
|
|
631
|
+
task_ids = DagRun._get_partial_task_ids(dag_run.dag)
|
|
658
632
|
|
|
659
633
|
date = dag_run.logical_date
|
|
660
634
|
if AIRFLOW_V_3_0_PLUS and date is None:
|
|
@@ -690,10 +664,7 @@ class OpenLineageListener:
|
|
|
690
664
|
self.log.debug("Executor have not started before `on_dag_run_failed`")
|
|
691
665
|
return
|
|
692
666
|
|
|
693
|
-
|
|
694
|
-
task_ids = DagRun._get_partial_task_ids(dag_run.dag)
|
|
695
|
-
else:
|
|
696
|
-
task_ids = dag_run.dag.task_ids if dag_run.dag and dag_run.dag.partial else None
|
|
667
|
+
task_ids = DagRun._get_partial_task_ids(dag_run.dag)
|
|
697
668
|
|
|
698
669
|
date = dag_run.logical_date
|
|
699
670
|
if AIRFLOW_V_3_0_PLUS and date is None:
|
|
@@ -59,25 +59,11 @@ def lineage_run_id(task_instance: TaskInstance):
|
|
|
59
59
|
For more information take a look at the guide:
|
|
60
60
|
:ref:`howto/macros:openlineage`
|
|
61
61
|
"""
|
|
62
|
-
if AIRFLOW_V_3_0_PLUS:
|
|
63
|
-
context = task_instance.get_template_context()
|
|
64
|
-
if hasattr(task_instance, "dag_run"):
|
|
65
|
-
dag_run = task_instance.dag_run
|
|
66
|
-
elif hasattr(context, "dag_run"):
|
|
67
|
-
dag_run = context["dag_run"]
|
|
68
|
-
if hasattr(dag_run, "logical_date") and dag_run.logical_date:
|
|
69
|
-
date = dag_run.logical_date
|
|
70
|
-
else:
|
|
71
|
-
date = dag_run.run_after
|
|
72
|
-
elif hasattr(task_instance, "logical_date"):
|
|
73
|
-
date = task_instance.logical_date
|
|
74
|
-
else:
|
|
75
|
-
date = task_instance.execution_date
|
|
76
62
|
return OpenLineageAdapter.build_task_instance_run_id(
|
|
77
63
|
dag_id=task_instance.dag_id,
|
|
78
64
|
task_id=task_instance.task_id,
|
|
79
65
|
try_number=task_instance.try_number,
|
|
80
|
-
logical_date=
|
|
66
|
+
logical_date=_get_logical_date(task_instance),
|
|
81
67
|
map_index=task_instance.map_index,
|
|
82
68
|
)
|
|
83
69
|
|
|
@@ -101,3 +87,44 @@ def lineage_parent_id(task_instance: TaskInstance):
|
|
|
101
87
|
lineage_run_id(task_instance),
|
|
102
88
|
)
|
|
103
89
|
)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def lineage_root_parent_id(task_instance: TaskInstance):
|
|
93
|
+
return "/".join(
|
|
94
|
+
(
|
|
95
|
+
lineage_job_namespace(),
|
|
96
|
+
lineage_root_job_name(task_instance),
|
|
97
|
+
lineage_root_run_id(task_instance),
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def lineage_root_job_name(task_instance: TaskInstance):
|
|
103
|
+
return task_instance.dag_id
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def lineage_root_run_id(task_instance: TaskInstance):
|
|
107
|
+
return OpenLineageAdapter.build_dag_run_id(
|
|
108
|
+
dag_id=task_instance.dag_id,
|
|
109
|
+
logical_date=_get_logical_date(task_instance),
|
|
110
|
+
clear_number=task_instance.dag_run.clear_number,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _get_logical_date(task_instance):
|
|
115
|
+
# todo: remove when min airflow version >= 3.0
|
|
116
|
+
if AIRFLOW_V_3_0_PLUS:
|
|
117
|
+
context = task_instance.get_template_context()
|
|
118
|
+
if hasattr(task_instance, "dag_run"):
|
|
119
|
+
dag_run = task_instance.dag_run
|
|
120
|
+
elif hasattr(context, "dag_run"):
|
|
121
|
+
dag_run = context["dag_run"]
|
|
122
|
+
if hasattr(dag_run, "logical_date") and dag_run.logical_date:
|
|
123
|
+
date = dag_run.logical_date
|
|
124
|
+
else:
|
|
125
|
+
date = dag_run.run_after
|
|
126
|
+
elif hasattr(task_instance, "logical_date"):
|
|
127
|
+
date = task_instance.logical_date
|
|
128
|
+
else:
|
|
129
|
+
date = task_instance.execution_date
|
|
130
|
+
return date
|
|
@@ -25,7 +25,6 @@ from airflow.providers.openlineage.plugins.macros import (
|
|
|
25
25
|
lineage_parent_id,
|
|
26
26
|
lineage_run_id,
|
|
27
27
|
)
|
|
28
|
-
from airflow.providers.openlineage.version_compat import AIRFLOW_V_2_10_PLUS
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
class OpenLineageProviderPlugin(AirflowPlugin):
|
|
@@ -40,10 +39,9 @@ class OpenLineageProviderPlugin(AirflowPlugin):
|
|
|
40
39
|
if not conf.is_disabled():
|
|
41
40
|
macros = [lineage_job_namespace, lineage_job_name, lineage_run_id, lineage_parent_id]
|
|
42
41
|
listeners = [get_openlineage_listener()]
|
|
43
|
-
|
|
44
|
-
from airflow.lineage.hook import HookLineageReader
|
|
42
|
+
from airflow.lineage.hook import HookLineageReader
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
hook_lineage_readers = [HookLineageReader]
|
|
47
45
|
else:
|
|
48
46
|
macros = []
|
|
49
47
|
listeners = []
|
|
@@ -24,6 +24,8 @@ from airflow.providers.openlineage.plugins.listener import get_openlineage_liste
|
|
|
24
24
|
from airflow.providers.openlineage.plugins.macros import (
|
|
25
25
|
lineage_job_name,
|
|
26
26
|
lineage_job_namespace,
|
|
27
|
+
lineage_root_job_name,
|
|
28
|
+
lineage_root_run_id,
|
|
27
29
|
lineage_run_id,
|
|
28
30
|
)
|
|
29
31
|
|
|
@@ -48,6 +50,9 @@ def _get_parent_job_information_as_spark_properties(context: Context) -> dict:
|
|
|
48
50
|
"spark.openlineage.parentJobNamespace": lineage_job_namespace(),
|
|
49
51
|
"spark.openlineage.parentJobName": lineage_job_name(ti), # type: ignore[arg-type]
|
|
50
52
|
"spark.openlineage.parentRunId": lineage_run_id(ti), # type: ignore[arg-type]
|
|
53
|
+
"spark.openlineage.rootParentRunId": lineage_root_run_id(ti), # type: ignore[arg-type]
|
|
54
|
+
"spark.openlineage.rootParentJobName": lineage_root_job_name(ti), # type: ignore[arg-type]
|
|
55
|
+
"spark.openlineage.rootParentJobNamespace": lineage_job_namespace(),
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
|