eladkal commented on code in PR #47993:
URL: https://github.com/apache/airflow/pull/47993#discussion_r2022343207


##########
providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:
##########
@@ -37,15 +37,22 @@
 from airflow.providers.apache.beam.triggers.beam import 
BeamJavaPipelineTrigger, BeamPythonPipelineTrigger
 from airflow.providers.google.cloud.hooks.dataflow import (
     DataflowHook,
-    DataflowJobStatus,
     process_line_and_extract_dataflow_job_id_callback,
 )
 from airflow.providers.google.cloud.hooks.gcs import GCSHook, _parse_gcs_url
 from airflow.providers.google.cloud.links.dataflow import DataflowJobLink
 from airflow.providers.google.cloud.operators.dataflow import CheckJobRunning, 
DataflowConfiguration
-from airflow.providers.google.cloud.triggers.dataflow import (
-    DataflowJobStatusTrigger,
-)
+
+try:
+    from airflow.providers.google.cloud.triggers.dataflow import 
DataflowJobStateCompleteTrigger
+except ImportError:
+    from airflow.exceptions import AirflowOptionalProviderFeatureException
+
+    raise AirflowOptionalProviderFeatureException(
+        "Failed to import DataflowJobStateCompleteTrigger. To use this 
functionality, please install"
+        "the apache-airflow-providers-google >= 15.0.0"
+    )

Review Comment:
   isn't that the same as just setting min version of google provider to be 
15.0 for beam provider?
   I mean this this a top level import thus anyone who uses beam operators will 
have to update google provider regardless if they are using defer or not



-- 
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