Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid deprecation of DataFusionPipelineLinkHelper #37755

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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