hussein-awala commented on code in PR #31645:
URL: https://github.com/apache/airflow/pull/31645#discussion_r1233371942
##########
airflow/providers/apache/beam/operators/beam.py:
##########
@@ -294,10 +294,13 @@ def execute(self, context: Context):
raise AirflowException("Beam hook is not defined.")
with ExitStack() as exit_stack:
+ gcs_hook = GCSHook(gcp_conn_id=self.gcp_conn_id)
if self.py_file.lower().startswith("gs://"):
- gcs_hook = GCSHook(gcp_conn_id=self.gcp_conn_id)
tmp_gcs_file =
exit_stack.enter_context(gcs_hook.provide_file(object_url=self.py_file))
self.py_file = tmp_gcs_file.name
+ if snake_case_pipeline_options.get("requirements_file",
"").startswith("gs://"):
+ tmp_req_file =
exit_stack.enter_context(gcs_hook.provide_file(object_url=snake_case_pipeline_options["requirements_file"]))
Review Comment:
```suggestion
tmp_req_file = exit_stack.enter_context(
gcs_hook.provide_file(object_url=snake_case_pipeline_options["requirements_file"])
)
```
--
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]