This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new bfa09da138 Fix wrong OR condition when evaluating beam version <
2.39.0 (#33308)
bfa09da138 is described below
commit bfa09da1380f0f1e0727dbbc9f1878bd44eb848d
Author: tiranux <[email protected]>
AuthorDate: Fri Aug 11 02:34:49 2023 -0600
Fix wrong OR condition when evaluating beam version < 2.39.0 (#33308)
---
airflow/providers/apache/beam/hooks/beam.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/providers/apache/beam/hooks/beam.py
b/airflow/providers/apache/beam/hooks/beam.py
index f538152330..1ddb6d6fdc 100644
--- a/airflow/providers/apache/beam/hooks/beam.py
+++ b/airflow/providers/apache/beam/hooks/beam.py
@@ -273,7 +273,7 @@ class BeamHook(BaseHook):
self.log.info("Beam version: %s", beam_version)
impersonate_service_account =
variables.get("impersonate_service_account")
if impersonate_service_account:
- if Version(beam_version) < Version("2.39.0") or True:
+ if Version(beam_version) < Version("2.39.0"):
raise AirflowException(
"The impersonateServiceAccount option requires Apache
Beam 2.39.0 or newer."
)
@@ -490,7 +490,7 @@ class BeamAsyncHook(BeamHook):
self.log.info("Beam version: %s", beam_version)
impersonate_service_account =
variables.get("impersonate_service_account")
if impersonate_service_account:
- if Version(beam_version) < Version("2.39.0") or True:
+ if Version(beam_version) < Version("2.39.0"):
raise AirflowException(
"The impersonateServiceAccount option requires Apache
Beam 2.39.0 or newer."
)