apache-airflow-providers-openlineage 2.6.1__py3-none-any.whl → 2.7.0rc1__py3-none-any.whl

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.

Potentially problematic release.


This version of apache-airflow-providers-openlineage might be problematic. Click here for more details.

@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "2.6.1"
32
+ __version__ = "2.7.0"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -55,9 +55,12 @@ if TYPE_CHECKING:
55
55
  from airflow.utils.state import DagRunState
56
56
  else:
57
57
  try:
58
- from airflow.sdk.execution_time.secrets_masker import SecretsMasker, _secrets_masker
58
+ from airflow.sdk._shared.secrets_masker import SecretsMasker, _secrets_masker
59
59
  except ImportError:
60
- from airflow.utils.log.secrets_masker import SecretsMasker, _secrets_masker
60
+ try:
61
+ from airflow.sdk.execution_time.secrets_masker import SecretsMasker, _secrets_masker
62
+ except ImportError:
63
+ from airflow.utils.log.secrets_masker import SecretsMasker, _secrets_masker
61
64
 
62
65
  _PRODUCER = f"https://github.com/apache/airflow/tree/providers-openlineage/{OPENLINEAGE_PROVIDER_VERSION}"
63
66
 
@@ -76,10 +76,12 @@ class AirflowStateRunFacet(RunFacet):
76
76
  Attributes:
77
77
  dagRunState: This indicates the final status of the entire DAG run (e.g., "success", "failed").
78
78
  tasksState: A dictionary mapping task IDs to their respective states. (e.g., "failed", "skipped").
79
+ tasksDuration: A dictionary mapping task IDs to it's duration in seconds.
79
80
  """
80
81
 
81
82
  dagRunState: str
82
83
  tasksState: dict[str, str]
84
+ tasksDuration: dict[str, float]
83
85
 
84
86
 
85
87
  @define
@@ -18,13 +18,13 @@ from __future__ import annotations
18
18
 
19
19
  import logging
20
20
  import os
21
+ import sys
21
22
  from concurrent.futures import ProcessPoolExecutor
22
23
  from datetime import datetime
23
24
  from typing import TYPE_CHECKING
24
25
 
25
26
  import psutil
26
27
  from openlineage.client.serde import Serde
27
- from setproctitle import getproctitle, setproctitle
28
28
 
29
29
  from airflow import settings
30
30
  from airflow.listeners import hookimpl
@@ -48,16 +48,22 @@ from airflow.providers.openlineage.utils.utils import (
48
48
  is_selective_lineage_enabled,
49
49
  print_warning,
50
50
  )
51
+ from airflow.providers.openlineage.version_compat import timeout, timezone
51
52
  from airflow.settings import configure_orm
52
53
  from airflow.stats import Stats
53
- from airflow.utils import timezone
54
54
  from airflow.utils.state import TaskInstanceState
55
- from airflow.utils.timeout import timeout
56
55
 
57
56
  if TYPE_CHECKING:
58
57
  from airflow.sdk.execution_time.task_runner import RuntimeTaskInstance
59
58
  from airflow.settings import Session
60
59
 
60
+ if sys.platform == "darwin":
61
+ from setproctitle import getproctitle
62
+
63
+ setproctitle = lambda title: logging.getLogger(__name__).debug("Mac OS detected, skipping setproctitle")
64
+ else:
65
+ from setproctitle import getproctitle, setproctitle
66
+
61
67
  _openlineage_listener: OpenLineageListener | None = None
62
68
 
63
69
 
@@ -97,19 +97,27 @@ else:
97
97
  from airflow.datasets import Dataset as Asset
98
98
 
99
99
  try:
100
- from airflow.sdk.execution_time.secrets_masker import (
100
+ from airflow.sdk._shared.secrets_masker import (
101
101
  Redactable,
102
102
  Redacted,
103
103
  SecretsMasker,
104
104
  should_hide_value_for_key,
105
105
  )
106
106
  except ImportError:
107
- from airflow.utils.log.secrets_masker import (
108
- Redactable,
109
- Redacted,
110
- SecretsMasker,
111
- should_hide_value_for_key,
112
- )
107
+ try:
108
+ from airflow.sdk.execution_time.secrets_masker import (
109
+ Redactable,
110
+ Redacted,
111
+ SecretsMasker,
112
+ should_hide_value_for_key,
113
+ )
114
+ except ImportError:
115
+ from airflow.utils.log.secrets_masker import (
116
+ Redactable,
117
+ Redacted,
118
+ SecretsMasker,
119
+ should_hide_value_for_key,
120
+ )
113
121
 
114
122
  log = logging.getLogger(__name__)
115
123
  _NOMINAL_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
@@ -308,7 +316,7 @@ def get_user_provided_run_facets(ti: TaskInstance, ti_state: TaskInstanceState)
308
316
  def get_fully_qualified_class_name(operator: BaseOperator | MappedOperator) -> str:
309
317
  if isinstance(operator, (MappedOperator, SerializedBaseOperator)):
310
318
  # as in airflow.api_connexion.schemas.common_schema.ClassReferenceSchema
311
- return operator._task_module + "." + operator._task_type
319
+ return operator._task_module + "." + operator.task_type
312
320
  op_class = get_operator_class(operator)
313
321
  return op_class.__module__ + "." + op_class.__name__
314
322
 
@@ -732,6 +740,12 @@ def get_airflow_state_run_facet(
732
740
  "airflowState": AirflowStateRunFacet(
733
741
  dagRunState=dag_run_state,
734
742
  tasksState={ti.task_id: ti.state for ti in tis},
743
+ tasksDuration={
744
+ ti.task_id: ti.duration
745
+ if ti.duration is not None
746
+ else (ti.end_date - ti.start_date).total_seconds()
747
+ for ti in tis
748
+ },
735
749
  )
736
750
  }
737
751
 
@@ -39,7 +39,11 @@ if AIRFLOW_V_3_0_PLUS:
39
39
  else:
40
40
  from airflow.models import BaseOperator
41
41
 
42
- __all__ = [
43
- "AIRFLOW_V_3_0_PLUS",
44
- "BaseOperator",
45
- ]
42
+ try:
43
+ from airflow.sdk import timezone
44
+ from airflow.sdk.execution_time.timeout import timeout
45
+ except ImportError:
46
+ from airflow.utils import timezone # type: ignore[attr-defined,no-redef]
47
+ from airflow.utils.timeout import timeout # type: ignore[assignment,attr-defined,no-redef]
48
+
49
+ __all__ = ["AIRFLOW_V_3_0_PLUS", "BaseOperator", "timeout", "timezone"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-openlineage
3
- Version: 2.6.1
3
+ Version: 2.7.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.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
25
- Requires-Dist: apache-airflow-providers-common-compat>=1.4.0
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.36.0
28
28
  Requires-Dist: openlineage-python>=1.36.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.6.1/changelog.html
31
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.6.1
30
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.7.0/changelog.html
31
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-openlineage/2.7.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,9 +59,8 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
59
59
 
60
60
  Package ``apache-airflow-providers-openlineage``
61
61
 
62
- Release: ``2.6.1``
62
+ Release: ``2.7.0``
63
63
 
64
- Release Date: ``|PypiReleaseDate|``
65
64
 
66
65
  `OpenLineage <https://openlineage.io/>`__
67
66
 
@@ -73,12 +72,12 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
73
72
  are in ``airflow.providers.openlineage`` python package.
74
73
 
75
74
  You can find package information and changelog for the provider
76
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.6.1/>`_.
75
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.0/>`_.
77
76
 
78
77
  Installation
79
78
  ------------
80
79
 
81
- You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
80
+ You can install this package on top of an existing Airflow installation (see ``Requirements`` below
82
81
  for the minimum Airflow version supported) via
83
82
  ``pip install apache-airflow-providers-openlineage``
84
83
 
@@ -119,5 +118,5 @@ Dependent package
119
118
  ================================================================================================================== =================
120
119
 
121
120
  The changelog for the provider package can be found in the
122
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.6.1/changelog.html>`_.
121
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.0/changelog.html>`_.
123
122
 
@@ -1,9 +1,9 @@
1
1
  airflow/providers/openlineage/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/openlineage/__init__.py,sha256=aBvB3_hcgx91HG81KlMLw1CWKV2i-e_fwFRmTcrfjiI,1500
2
+ airflow/providers/openlineage/__init__.py,sha256=V74GXGDPbkHBL8PGjhukBdt2qnse-q5vXJaaIwZcp-4,1500
3
3
  airflow/providers/openlineage/conf.py,sha256=9v2DpQ84BBCdRxPlh8QsboTqX8HXe-qeHVcTMRL5c3o,5807
4
4
  airflow/providers/openlineage/get_provider_info.py,sha256=2Oy13q-jA-UYt-a9pYBk4PnImYshGnJCPD1Jj80ChNw,9453
5
5
  airflow/providers/openlineage/sqlparser.py,sha256=8Aq0qbUUBthKjXBV756p2aBf8RYfCuBBfgxwhGpQIg4,20360
6
- airflow/providers/openlineage/version_compat.py,sha256=7RHBehpYMeNSBtmJiPUeJHA0c7l-Eqsdy546kW3RFa4,1712
6
+ airflow/providers/openlineage/version_compat.py,sha256=weU73JlGTWEcfDLnuFGOXw9Yiagp-bU_--nRgogt-jk,2020
7
7
  airflow/providers/openlineage/extractors/__init__.py,sha256=I0X4f6zUniclyD9zT0DFHRImpCpJVP4MkPJT3cd7X5I,1081
8
8
  airflow/providers/openlineage/extractors/base.py,sha256=0K7prvOeYjs30P87zgcOmABZOZYsw0WYoFBstS_vgmY,6449
9
9
  airflow/providers/openlineage/extractors/bash.py,sha256=3aR0PXs8fzRLibRxXN1R8wMZnGzyCur7mjpy8e5GC4A,2583
@@ -18,17 +18,17 @@ airflow/providers/openlineage/facets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOF
18
18
  airflow/providers/openlineage/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
19
19
  airflow/providers/openlineage/operators/empty.py,sha256=g3ksadUeHW6IydzqIT4KxGU3Agt-F7NmKmOS6T47UDs,1710
20
20
  airflow/providers/openlineage/plugins/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
21
- airflow/providers/openlineage/plugins/adapter.py,sha256=PyCec9S22_NZd7VTuJxQrJ7SFGfNgJoSyTlKFKYnzVg,22930
22
- airflow/providers/openlineage/plugins/facets.py,sha256=VvyMYR6ONkC95q5FdNmohv0scbA1Ej_B5cQ97as5GvA,4161
23
- airflow/providers/openlineage/plugins/listener.py,sha256=bE3g0Qfo5aE89JOBJUi-CuShpKjrG5hDFa1hLbPw-5I,32128
21
+ airflow/providers/openlineage/plugins/adapter.py,sha256=moIgAoBTTVaKuU-i00xvkKyR7Rv9hoIU79awcZVJwg8,23065
22
+ airflow/providers/openlineage/plugins/facets.py,sha256=x2EPwst9MsoO53OpFV_aANO_rhiPq_2GLP4UOrqBnnQ,4279
23
+ airflow/providers/openlineage/plugins/listener.py,sha256=wtYWPl_rftzp842gtUpnhr5ffraz-78vakUWxAztUtM,32329
24
24
  airflow/providers/openlineage/plugins/macros.py,sha256=RfxkpNq78CHzfTAf9X7MQ_zRArMRu9sSD2j69fPSK7s,5265
25
25
  airflow/providers/openlineage/plugins/openlineage.py,sha256=dP3GOVtOGAIokeaeRx2OW_c1TKAxDvATlD9OGMyXqr0,2032
26
26
  airflow/providers/openlineage/utils/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
27
27
  airflow/providers/openlineage/utils/selective_enable.py,sha256=Nf94UaziAQHDvpx7bEDMRbT3twXVslDilUI1ZTEOB0M,3382
28
28
  airflow/providers/openlineage/utils/spark.py,sha256=X5liLxVLgQcgPF_0lFtQULeMOv_9dGj-HFjtZvWFgOo,7626
29
29
  airflow/providers/openlineage/utils/sql.py,sha256=b_k2fUyGGWzR1eau7tgq7vKQJsR7wPQzDF8M-WRq6jk,9548
30
- airflow/providers/openlineage/utils/utils.py,sha256=JWZ2VTuOAqd2IEMpd8AA0tdaPsomRvADm0-MzcsBEOs,35225
31
- apache_airflow_providers_openlineage-2.6.1.dist-info/entry_points.txt,sha256=GAx0_i2OeZzqaiiiYuA-xchICDXiCT5kVqpKSxsOjt4,214
32
- apache_airflow_providers_openlineage-2.6.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
33
- apache_airflow_providers_openlineage-2.6.1.dist-info/METADATA,sha256=KH1KKS53aTxTL_crbB3zreqPlYOG0kw8el9pQlScKjc,5726
34
- apache_airflow_providers_openlineage-2.6.1.dist-info/RECORD,,
30
+ airflow/providers/openlineage/utils/utils.py,sha256=AqsrTPAoXoPnetJPxRED9qa1tsdECP44352gnuTbVj0,35715
31
+ apache_airflow_providers_openlineage-2.7.0rc1.dist-info/entry_points.txt,sha256=GAx0_i2OeZzqaiiiYuA-xchICDXiCT5kVqpKSxsOjt4,214
32
+ apache_airflow_providers_openlineage-2.7.0rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
33
+ apache_airflow_providers_openlineage-2.7.0rc1.dist-info/METADATA,sha256=d9ZUhTdnTDNhPFEw7hYM0YnC9RTOTytbvnC_pMVcv00,5714
34
+ apache_airflow_providers_openlineage-2.7.0rc1.dist-info/RECORD,,