olegkachur-e commented on code in PR #47993:
URL: https://github.com/apache/airflow/pull/47993#discussion_r2028766412
##########
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:
I reworked the solution to support both versions.
--
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]