This is an automated email from the ASF dual-hosted git repository.

mobuchowski pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d9f7febe33 chore: remove openlineage deprecation warnings (#41284)
d9f7febe33 is described below

commit d9f7febe3357c83e3eecc8b2c14dec117c6915d8
Author: Kacper Muda <[email protected]>
AuthorDate: Thu Aug 8 11:24:32 2024 +0200

    chore: remove openlineage deprecation warnings (#41284)
    
    Signed-off-by: Kacper Muda <[email protected]>
---
 airflow/providers/openlineage/plugins/facets.py | 11 -----------
 airflow/providers/openlineage/utils/utils.py    |  8 ++++++++
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/airflow/providers/openlineage/plugins/facets.py 
b/airflow/providers/openlineage/plugins/facets.py
index 57d6cb1a15..d952cd0449 100644
--- a/airflow/providers/openlineage/plugins/facets.py
+++ b/airflow/providers/openlineage/plugins/facets.py
@@ -17,17 +17,10 @@
 from __future__ import annotations
 
 from attrs import define
-from deprecated import deprecated
 from openlineage.client.facet_v2 import JobFacet, RunFacet
 from openlineage.client.utils import RedactMixin
 
-from airflow.exceptions import AirflowProviderDeprecationWarning
 
-
-@deprecated(
-    reason="To be removed in the next release. Make sure to use information 
from AirflowRunFacet instead.",
-    category=AirflowProviderDeprecationWarning,
-)
 @define
 class AirflowMappedTaskRunFacet(RunFacet):
     """Run facet containing information about mapped tasks."""
@@ -123,10 +116,6 @@ class UnknownOperatorInstance(RedactMixin):
     _skip_redact = ["name", "type"]
 
 
-@deprecated(
-    reason="To be removed in the next release. Make sure to use information 
from AirflowRunFacet instead.",
-    category=AirflowProviderDeprecationWarning,
-)
 @define
 class UnknownOperatorAttributeRunFacet(RunFacet):
     """RunFacet that describes unknown operators in an Airflow DAG."""
diff --git a/airflow/providers/openlineage/utils/utils.py 
b/airflow/providers/openlineage/utils/utils.py
index 3c5ede2c7c..51306bec99 100644
--- a/airflow/providers/openlineage/utils/utils.py
+++ b/airflow/providers/openlineage/utils/utils.py
@@ -85,6 +85,10 @@ def get_job_name(task: TaskInstance) -> str:
 def get_airflow_mapped_task_facet(task_instance: TaskInstance) -> dict[str, 
Any]:
     # check for -1 comes from SmartSensor compatibility with dynamic task 
mapping
     # this comes from Airflow code
+    log.debug(
+        "AirflowMappedTaskRunFacet is deprecated and will be removed. "
+        "Use information from AirflowRunFacet instead."
+    )
     if hasattr(task_instance, "map_index") and getattr(task_instance, 
"map_index") != -1:
         return {"airflow_mappedTask": 
AirflowMappedTaskRunFacet.from_task_instance(task_instance)}
     return {}
@@ -536,6 +540,10 @@ def _emits_ol_events(task: BaseOperator | MappedOperator) 
-> bool:
 def get_unknown_source_attribute_run_facet(task: BaseOperator, name: str | 
None = None):
     if not name:
         name = get_operator_class(task).__name__
+    log.debug(
+        "UnknownOperatorAttributeRunFacet is deprecated and will be removed. "
+        "Use information from AirflowRunFacet instead."
+    )
     return {
         "unknownSourceAttribute": attrs.asdict(
             UnknownOperatorAttributeRunFacet(

Reply via email to