molcay commented on code in PR #38673:
URL: https://github.com/apache/airflow/pull/38673#discussion_r1557431376


##########
tests/providers/google/cloud/operators/test_automl.py:
##########
@@ -90,6 +100,22 @@ def test_execute(self, mock_hook):
             metadata=(),
         )
 
+    
@mock.patch("airflow.providers.google.cloud.operators.automl.CloudAutoMLHook")
+    def test_execute_deprecated(self, mock_hook):
+        op = AutoMLTrainModelOperator(
+            model=MODEL_DEPRECATED,
+            location=GCP_LOCATION,
+            project_id=GCP_PROJECT_ID,
+            task_id=TASK_ID,
+        )
+        with pytest.raises(AirflowProviderDeprecationWarning) as err:

Review Comment:
   @Taragolis Hi again, I checked the docs and tried to use warnings 
(`pytest.warns`) but the thing is that we are **raising** the 
`AirflowProviderDeprecationWarning` in case of specific usage of the operators. 
I know it is a little bit different than general behavior but all these 
services ([AutoML](https://cloud.google.com/automl/docs) 
([Tables](https://cloud.google.com/automl-tables/docs/deprecations), 
[Vision](https://cloud.google.com/vision/automl/docs/deprecations), [Video 
Intelligence](https://cloud.google.com/video-intelligence/automl/docs/deprecations),
 [Natural 
Language](https://cloud.google.com/natural-language/automl/docs/deprecations))) 
already are EoL but same operators can be use for AutoML Translation which is 
not deprecated.



##########
tests/providers/google/cloud/operators/test_automl.py:
##########
@@ -90,6 +100,22 @@ def test_execute(self, mock_hook):
             metadata=(),
         )
 
+    
@mock.patch("airflow.providers.google.cloud.operators.automl.CloudAutoMLHook")
+    def test_execute_deprecated(self, mock_hook):
+        op = AutoMLTrainModelOperator(
+            model=MODEL_DEPRECATED,
+            location=GCP_LOCATION,
+            project_id=GCP_PROJECT_ID,
+            task_id=TASK_ID,
+        )
+        with pytest.raises(AirflowProviderDeprecationWarning) as err:

Review Comment:
   @Taragolis Hi again, I checked the docs and tried to use warnings 
(`pytest.warns`) but the thing is that we are **raising** the 
`AirflowProviderDeprecationWarning` in case of specific usage of the operators. 
I know it is a little bit different than general behavior but all these 
services ([AutoML](https://cloud.google.com/automl/docs) 
([Tables](https://cloud.google.com/automl-tables/docs/deprecations), 
[Vision](https://cloud.google.com/vision/automl/docs/deprecations), [Video 
Intelligence](https://cloud.google.com/video-intelligence/automl/docs/deprecations),
 [Natural 
Language](https://cloud.google.com/natural-language/automl/docs/deprecations))) 
already are EoL but same operators can be use for AutoML Translation which is 
**NOT** deprecated.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to