Skip to content

Commit

Permalink
Fix wrong OR condition when evaluating beam version < 2.39.0 (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiranux authored and ferruzzi committed Aug 17, 2023
1 parent e3605d5 commit edf7acd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/apache/beam/hooks/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def start_python_pipeline(
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."
)
Expand Down Expand Up @@ -490,7 +490,7 @@ async def start_python_pipeline_async(
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."
)
Expand Down

0 comments on commit edf7acd

Please sign in to comment.