You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "moiseenkov (via GitHub)" <gi...@apache.org> on 2023/09/21 08:05:28 UTC
[GitHub] [airflow] moiseenkov opened a new pull request, #34514: Refactor DataFusionInstanceLink usage
moiseenkov opened a new pull request, #34514:
URL: https://github.com/apache/airflow/pull/34514
Refactored buggy `DataFusionPipelineLinkHelper` into a more generic function.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "moiseenkov (via GitHub)" <gi...@apache.org>.
moiseenkov commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1342384125
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,21 +34,12 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
-class DataFusionPipelineLinkHelper:
Review Comment:
You are right. Updated PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on a diff in pull request #34514: Refactor DataFusionInstanceLink usage
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1339558030
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,21 +34,12 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
-class DataFusionPipelineLinkHelper:
Review Comment:
is this class part of the public API?
Do we need to deprecate it first?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal merged PR #34514:
URL: https://github.com/apache/airflow/pull/34514
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1356661637
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
You need to raise `AirflowProviderDeprecationWarning`
also the word consider suggests there is a choice... it's not the case. users must migrate as the class will be removed in future release
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "moiseenkov (via GitHub)" <gi...@apache.org>.
moiseenkov commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1356686152
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
Thanks for the comment. Fixed. Please re-review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1356661637
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
You need to raise `AirflowProviderDeprecationWarning`
also the word consider suggests there is a choice... it's not the case. users must migrate to the alternative as the class will be removed in future release
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "VladaZakharova (via GitHub)" <gi...@apache.org>.
VladaZakharova commented on PR #34514:
URL: https://github.com/apache/airflow/pull/34514#issuecomment-1757266701
@eladkal @potiuk
Hi Team! Can you please take a look on the changes once again? Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "moiseenkov (via GitHub)" <gi...@apache.org>.
moiseenkov commented on PR #34514:
URL: https://github.com/apache/airflow/pull/34514#issuecomment-1744345481
@eladkal , @kaxil , @Taragolis , hi,
can we merge this please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1356661637
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
You need to raise `AirflowProviderDeprecationWarning`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor DataFusionInstanceLink usage [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34514:
URL: https://github.com/apache/airflow/pull/34514#discussion_r1356661637
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
You need to raise `AirflowProviderDeprecationWarning`
also consider suggests there is a choice... it's not the case. User must migrate to the alternative as the class will be removed in future release
##########
airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -34,16 +35,25 @@
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
from airflow.providers.google.cloud.triggers.datafusion import DataFusionStartPipelineTrigger
from airflow.providers.google.cloud.utils.datafusion import DataFusionPipelineType
+from airflow.providers.google.cloud.utils.helpers import resource_path_to_dict
if TYPE_CHECKING:
from airflow.utils.context import Context
class DataFusionPipelineLinkHelper:
- """Helper class for Pipeline links."""
+ """
+ Helper class for Pipeline links.
+
+ .. warning::
+ This class is deprecated. Consider using ``resource_path_to_dict()`` instead.
+ """
@staticmethod
def get_project_id(instance):
+ warnings.warn(
+ "DataFusionPipelineLinkHelper is deprecated. Consider using resource_path_to_dict() instead."
Review Comment:
You need to raise `AirflowProviderDeprecationWarning`
also the word consider suggests there is a choice... it's not the case. User must migrate to the alternative as the class will be removed in future release
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org