e-galan commented on code in PR #39018:
URL: https://github.com/apache/airflow/pull/39018#discussion_r1576404398
##########
airflow/providers/google/cloud/hooks/dataflow.py:
##########
@@ -736,6 +736,69 @@ def start_template_dataflow(
jobs_controller.wait_for_done()
return response["job"]
+ @_fallback_to_location_from_variables
+ @_fallback_to_project_id_from_variables
+ @GoogleBaseHook.fallback_to_default_project_id
+ def launch_job_with_template(
Review Comment:
@Lee-W Yes, it was based on the `start_template_dataflow` function(). In my
opinion the `start_template_dataflow()` has too much going on inside of it.
There are two conditional callback function parameters, one of them deprecated,
as well as the `jobs_controller` object, all of which are tied together and
not needed for the deferrable mode.
So I thought that instead of adding even more parameters and, by extension,
additional ifs into the existing method, it would be better to write a separate
hook method for the deferrable mode. That way the code that uses the existing
method would not be affected, and it would be easier for us to maintain the
operators in the future.
What do you think?
--
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]