Skip to content

Commit

Permalink
Fix invalid deprecation of DataFusionPipelineLinkHelper (apache#37755)
Browse files Browse the repository at this point in the history
* Fix invalid deprecation of `DataFusionPipelineLinkHelper`

* single backquotes
  • Loading branch information
Taragolis authored Feb 27, 2024
1 parent 019cdfc commit f001576
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions airflow/providers/google/cloud/operators/datafusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f001576

Please sign in to comment.