mik-laj commented on a change in pull request #8553:
URL: https://github.com/apache/airflow/pull/8553#discussion_r416146984



##########
File path: airflow/providers/google/cloud/hooks/dataflow.py
##########
@@ -640,9 +659,8 @@ def start_python_dataflow(  # pylint: 
disable=too-many-arguments
         variables['job_name'] = name
         variables['region'] = location
 
-        def label_formatter(labels_dict):
-            return ['--labels={}={}'.format(key, value)
-                    for key, value in labels_dict.items()]
+        if 'labels' in variables:
+            variables['labels'] = ['{}={}'.format(key, value) for key, value 
in variables['labels'].items()]

Review comment:
       It depends on the SDK that is used.  These two SDK require different 
argument formats.
   
   We have three related methods.
   * start_python_dataflow  
   * start_java_dataflow
   * _start_dataflow
   
   The first two methods are public and dependent on the SDK. They are 
responsible for introducing changes dependent on the SDK, e.g. environment 
preparation. 
   _start_dataflow is an internal method. This starts the system process and 
supervises execution. I have the impression that this separation is helpful.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to