This is an automated email from the ASF dual-hosted git repository. potiuk 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 f001576a94 Fix invalid deprecation of `DataFusionPipelineLinkHelper` (#37755) f001576a94 is described below commit f001576a94bd7e03753ebe37aa663a9f1865ccf5 Author: Andrey Anshin <andrey.ans...@taragol.is> AuthorDate: Wed Feb 28 03:54:50 2024 +0400 Fix invalid deprecation of `DataFusionPipelineLinkHelper` (#37755) * Fix invalid deprecation of `DataFusionPipelineLinkHelper` * single backquotes --- airflow/providers/google/cloud/operators/datafusion.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/airflow/providers/google/cloud/operators/datafusion.py b/airflow/providers/google/cloud/operators/datafusion.py index 4ad4539c96..9071d01e95 100644 --- a/airflow/providers/google/cloud/operators/datafusion.py +++ b/airflow/providers/google/cloud/operators/datafusion.py @@ -20,6 +20,7 @@ from __future__ import annotations import time from typing import TYPE_CHECKING, Any, Sequence +from deprecated import deprecated from google.api_core.retry import exponential_sleep_generator from googleapiclient.errors import HttpError @@ -49,10 +50,11 @@ class DataFusionPipelineLinkHelper: """ @staticmethod + @deprecated( + reason="Please use `airflow.providers.google.cloud.utils.helpers.resource_path_to_dict` instead.", + category=AirflowProviderDeprecationWarning, + ) def get_project_id(instance): - raise AirflowProviderDeprecationWarning( - "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead." - ) instance = instance["name"] project_id = next(x for x in instance.split("/") if x.startswith("airflow")) return project_id